Push KRE Docker Image to ECR #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push KRE Docker Image to ECR | |
on: | |
workflow_dispatch: | |
inputs: | |
KRE_VERSION: | |
description: 'KRE version (e.g: "10.0.0-dev"). Please reference the Release at https://katalon.atlassian.net/wiki/spaces/KSR/pages/3005284354/Building+and+Delivery+Pipeline' | |
required: true | |
DOCKER_IMAGE_PUBLISHED_TAG: | |
description: 'Docker image tag (e.g: "10.0.0-latest"). Optional, KRE version is the default value.' | |
required: false | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
run: | |
name: Run | |
runs-on: ubuntu-latest | |
env: | |
KRE_VERSION: ${{ inputs.KRE_VERSION }} | |
DOCKER_IMAGE_PUBLISHED_TAG: ${{ inputs.DOCKER_IMAGE_PUBLISHED_TAG || inputs.KRE_VERSION }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::002582244933:role/katalon-github-oidc-federation | |
role-session-name: github-actions | |
aws-region: us-east-1 | |
mask-aws-account-id: "no" | |
- name: Login to Amazon ECR | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build & Push | |
run: | | |
chmod u+x ./build/*.sh | |
./build/clean.sh $KRE_VERSION | |
./build/build-for-ecr.sh $KRE_VERSION $DOCKER_IMAGE_PUBLISHED_TAG |