mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 18:28:22 +00:00
Refs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value Signed-off-by: Rui Chen <rui@chenrui.dev>
48 lines
1.2 KiB
YAML
48 lines
1.2 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
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
image: tonistiigi/binfmt:latest
|
|
platforms: arm64,arm
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to Packages Container registry
|
|
uses: docker/login-action@v1
|
|
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@v2
|
|
with:
|
|
context: testing
|
|
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
|
|
push: true
|
|
tags: |
|
|
ghcr.io/runatlantis/testing-env:${{env.TODAY}}
|
|
ghcr.io/runatlantis/testing-env:latest
|