diff --git a/.github/workflows/build-ecr-image.yml b/.github/workflows/build-ecr-image.yml index 42669367..4a3bc58a 100644 --- a/.github/workflows/build-ecr-image.yml +++ b/.github/workflows/build-ecr-image.yml @@ -117,6 +117,7 @@ on: description: "Build's context is the set of files located in the specified PATH or URL" required: false type: string + default: . # uses checkout ref file: description: "Path to the Dockerfile" required: false diff --git a/.github/workflows/test-build-ecr-image.yml b/.github/workflows/test-build-ecr-image.yml index 90733e71..2bd30eee 100644 --- a/.github/workflows/test-build-ecr-image.yml +++ b/.github/workflows/test-build-ecr-image.yml @@ -17,7 +17,7 @@ defaults: shell: bash jobs: - # Build for Branch + # Build for Branch no ref run-build-ecr-image-workflow: uses: ./.github/workflows/build-ecr-image.yml with: @@ -29,7 +29,6 @@ jobs: aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} test-build-ecr-image-workflow: - name: 'Uses the build-ecr-image workflow' runs-on: ubuntu-latest needs: run-build-ecr-image-workflow steps: @@ -42,20 +41,43 @@ jobs: aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} ref: ${{ github.sha }} + # Build for Branch name + run-build-ecr-image-workflow-on-branch-name: + uses: ./.github/workflows/build-ecr-image.yml + with: + file: .github/actions/test-build-ecr-image/Dockerfile + repository-name: github-actions-tests + role-name: github-actions-tests + build-args: VERSION=${{ github.base_ref }} + ref: ${{ github.base_ref }} + secrets: + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + + # Build for SHA + run-build-ecr-image-workflow-on-github-sha: + uses: ./.github/workflows/build-ecr-image.yml + with: + file: .github/actions/test-build-ecr-image/Dockerfile + repository-name: github-actions-tests + role-name: github-actions-tests + build-args: VERSION=${{ github.sha }} + ref: ${{ github.sha }} + secrets: + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + # Build for Tag run-build-ecr-image-workflow-tag: uses: ./.github/workflows/build-ecr-image.yml with: - ref: v2.2.0-rc.0 + ref: v2.6.4-rc.0 file: .github/actions/test-build-ecr-image/Dockerfile repository-name: github-actions-tests role-name: github-actions-tests - build-args: VERSION=v2.2.0-rc.0 + build-args: VERSION=v2.6.4-rc.0 secrets: aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} test-build-ecr-image-workflow-tag: - name: 'Uses the build-ecr-image workflow' runs-on: ubuntu-latest needs: run-build-ecr-image-workflow-tag steps: