Skip to content

Commit

Permalink
chore(ops): update gh workflow for ecr push (#906)
Browse files Browse the repository at this point in the history
* chore(ops): update gh workflow for ecr push

* update to eu-west-1 for region

* chore(ops): registry

* chore(ops): updated release

* chore(ops): updated release

---------

Co-authored-by: JJ Adonis <[email protected]>
  • Loading branch information
veralygit and thedoublejay authored Apr 12, 2023
1 parent 0a10457 commit ed73b44
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/release-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,34 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

env:
APPS: "bridge-api"

jobs:
aws_ecr:
name: Publish AWS ECR
environment: AWS ECR
runs-on: ubuntu-latest
strategy:
matrix:
app: [bridge-api]
include:
- name: bridge-api-staging
environment: AWS ECR
acc: 738942439028
- name: bridge-api
environment: AWS ECR
acc: 626169061435
environment: ${{ matrix.environment }}
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0

- uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::738942439028:role/GITHUB_OIDC_WAVESHQ_BRIDGE_ECR
aws-region: eu-west-1
role-to-assume: arn:aws:iam::${{ matrix.acc }}:role/GITHUB_OIDC_WAVESHQ_BRIDGE_ECR_PRIV
role-duration-seconds: 900

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@2f9f10ea3fa2eed41ac443fee8bfbd059af2d0a4 # v1.6.0
with:
registry-type: public
registry-type: private

- name: Resolve ECR Tags
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
Expand All @@ -55,8 +58,8 @@ jobs:

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: public.ecr.aws/w1x3w8l6
IMAGE_TAG: bridge-api:${{ steps.ecr-tags.outputs.result }}
ECR_REGISTRY: ${{ matrix.acc }}.dkr.ecr.eu-west-1.amazonaws.com
IMAGE_TAG: private-bridge-api:${{ steps.ecr-tags.outputs.result }}
run: |
docker build --file apps/server/Dockerfile -t $ECR_REGISTRY/$IMAGE_TAG .
docker push $ECR_REGISTRY/$IMAGE_TAG
Expand Down

0 comments on commit ed73b44

Please sign in to comment.