chore(deps): update docker/build-push-action action to v5 - autoclosed #111
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- | |
name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- | |
name: Build EE context with Docker | |
env: | |
DOCKER_BUILDKIT: 1 | |
run: | | |
tox -e docker | |
- | |
name: Configure AWS credentials by OIDC | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
role-to-assume: arn:aws:iam::343598423625:role/ugns-gbl-github-actions | |
role-duration-seconds: 1200 | |
aws-region: us-east-1 | |
- | |
name: Assume IAM Role | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | |
aws-session-token: ${{ env.AWS_SESSION_TOKEN }} | |
role-to-assume: arn:aws:iam::804433379618:role/GitHubActionsExecution | |
role-skip-session-tagging: true | |
role-duration-seconds: 1200 | |
aws-region: us-east-1 | |
- | |
name: Login to Public ECR | |
uses: docker/login-action@v2 | |
with: | |
registry: public.ecr.aws | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
public.ecr.aws/undergrid/awx-custom-ee | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: context | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |