Files
atlantis/.github/workflows/testing-env-image.yml
Clemens Wältken 8c0ca6bb29 workflows: build image in parallel (#2361)
* Enable GitHub matrix strategy to run builds in parallel

* apply matrix build for the other images

Signed-off-by: Rui Chen <rui@chenrui.dev>

Co-authored-by: Rui Chen <rui@chenrui.dev>
2022-07-06 22:18:31 -04:00

54 lines
1.3 KiB
YAML

name: testing-env-image
on:
push:
paths:
- "testing/**"
- ".github/workflows/testing-env-image.yml"
branches:
- "master"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/arm64/v8
- linux/amd64
- linux/arm/v7
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Packages Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: echo "TODAY=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
- name: Build and push testing-env:${{env.TODAY}} image
uses: docker/build-push-action@v3
with:
context: testing
platforms: ${{ matrix.platform }}
push: true
tags: |
ghcr.io/runatlantis/testing-env:${{env.TODAY}}
ghcr.io/runatlantis/testing-env:latest