Skip to content

Bump docker/setup-buildx-action from 2 to 3 #47

Bump docker/setup-buildx-action from 2 to 3

Bump docker/setup-buildx-action from 2 to 3 #47

---
name: 'Run build-ecr-image workflow'
on:
pull_request:
paths:
- .github/workflows/build-ecr-image.yml
- .github/actions/test-build-ecr-image/*
permissions:
id-token: write # aws auth
contents: write # publish release assets
defaults:
run:
shell: bash
jobs:
# Build for Branch no ref
run-build-ecr-image-workflow:
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 }}
secrets:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
test-build-ecr-image-workflow:
runs-on: ubuntu-latest
needs: run-build-ecr-image-workflow
steps:
- name: 'Checkout actions'
uses: actions/checkout@v2
- name: 'Test build-ecr-image workflow'
uses: ./.github/actions/test-build-ecr-image
with:
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.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.6.4-rc.0
secrets:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
test-build-ecr-image-workflow-tag:
runs-on: ubuntu-latest
needs: run-build-ecr-image-workflow-tag
steps:
- name: 'Checkout actions'
uses: actions/checkout@v2
- name: 'Test build-ecr-image workflow'
uses: ./.github/actions/test-build-ecr-image
with:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
ref: v2.6.4-rc.0
run-build-ecr-image-skip-if-exists:
needs: run-build-ecr-image-workflow-on-github-sha # The image has to have been created previously
uses: ./.github/workflows/build-ecr-image.yml
with:
# Copied from run-build-ecr-image-workflow-on-github-sha
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 }}
# And add the skip
skip-if-exists: true
secrets:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}