Skip to content

prod-release

prod-release #59

Workflow file for this run

name: prod-release
on:
workflow_dispatch:
inputs:
tag:
description: "The tag for this release (must already be pushed)."
required: true
permissions:
contents: read
jobs:
prod-release:
name: prod-release
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Configure AWS Credentials (pull images)
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
role-to-assume: "${{ secrets.BETA_AWS_ROLE }}"
role-session-name: PullImages
- name: Pull Images To Region
shell: bash
env:
SRC: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com/amazon/appmesh-controller:${{ github.event.inputs.tag }}"
run: |
aws ecr get-login-password --region "us-west-2" | \
docker login --username AWS --password-stdin "${SRC}"
docker pull "${SRC}-linux_amd64"
docker pull "${SRC}-linux_arm64"
- name: Deploy Images to PDT
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_PDT_AWS_ACCOUNT }}.dkr.ecr.us-gov-west-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "us-gov-west-1"
role: "${{ secrets.PROD_PDT_AWS_ROLE }}"
- name: Deploy Images to OSU
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_OSU_AWS_ACCOUNT }}.dkr.ecr.us-gov-east-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "us-gov-east-1"
role: "${{ secrets.PROD_OSU_AWS_ROLE }}"