Skip to content

Update docker-push.yaml #33

Update docker-push.yaml

Update docker-push.yaml #33

Workflow file for this run

---
name: Docker Push
on: # yamllint disable-line rule:truthy
push:
tags:
- '**'
# workflow_run:
# workflows: ["Tag"]
# types:
# - completed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_push_poc:
name: Build & Push Image - POC
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set output
id: vars
run: echo "git_tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
# configure iam
- name: Configure IAM Role
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.POC_BACKSTAGE_DEPLOY_ARN }}
aws-region: us-east-1
continue-on-error: false
- name: Build, Tag, and Push
run: |
export IMAGE_TAG=${{ steps.vars.outputs.git_tag }}
export ENVIRONMENT=poc
export DOCKERHUB_USERNAME=${{ secrets.SF_ARCH_DOCKERHUB_USERNAME }}
export DOCKERHUB_PASSWORD=${{ secrets.SF_ARCH_DOCKERHUB_PASSWORD }}
./scripts/docker-build-tag-and-push.sh
build_and_push_prod:
name: Build & Push Image - Prod
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set output
id: vars
run: echo "git_tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
# configure iam
- name: Configure IAM Role
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.PROD_BACKSTAGE_DEPLOY_ARN }}
aws-region: us-east-1
continue-on-error: false
- name: Build, Tag, and Push
run: |
export IMAGE_TAG=${{ steps.vars.outputs.git_tag }}
export ENVIRONMENT=prod
export DOCKERHUB_USERNAME=${{ secrets.SF_ARCH_DOCKERHUB_USERNAME }}
export DOCKERHUB_PASSWORD=${{ secrets.SF_ARCH_DOCKERHUB_PASSWORD }}
./scripts/docker-build-tag-and-push.sh