2020-11-19 04:40:39 -05:00
|
|
|
name: e2e
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2021-11-16 01:19:27 -05:00
|
|
|
- cron: '0 10 * * *'
|
2020-11-19 04:40:39 -05:00
|
|
|
push:
|
|
|
|
branches:
|
2022-01-18 08:57:27 -05:00
|
|
|
- 'master'
|
2020-11-19 04:40:39 -05:00
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
2020-11-19 17:56:09 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
-
|
|
|
|
registry: ''
|
|
|
|
slug: ghactionstest/ghactionstest
|
|
|
|
username_secret: DOCKERHUB_USERNAME
|
|
|
|
password_secret: DOCKERHUB_TOKEN
|
|
|
|
-
|
|
|
|
registry: ghcr.io
|
|
|
|
slug: ghcr.io/docker-ghactiontest/test
|
|
|
|
username_secret: GHCR_USERNAME
|
|
|
|
password_secret: GHCR_PAT
|
|
|
|
-
|
|
|
|
registry: registry.gitlab.com
|
|
|
|
slug: registry.gitlab.com/test1716/test
|
|
|
|
username_secret: GITLAB_USERNAME
|
|
|
|
password_secret: GITLAB_TOKEN
|
2020-12-17 06:06:34 -05:00
|
|
|
-
|
|
|
|
registry: 175142243308.dkr.ecr.us-east-2.amazonaws.com
|
|
|
|
slug: 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action
|
|
|
|
username_secret: AWS_ACCESS_KEY_ID
|
|
|
|
password_secret: AWS_SECRET_ACCESS_KEY
|
|
|
|
-
|
|
|
|
registry: public.ecr.aws
|
2020-12-17 08:56:10 -05:00
|
|
|
slug: public.ecr.aws/q3b5f1u4/test-docker-action
|
2020-12-17 06:06:34 -05:00
|
|
|
username_secret: AWS_ACCESS_KEY_ID
|
|
|
|
password_secret: AWS_SECRET_ACCESS_KEY
|
2020-12-22 11:42:19 -05:00
|
|
|
-
|
|
|
|
registry: us-east4-docker.pkg.dev
|
|
|
|
slug: us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action
|
|
|
|
username_secret: GAR_USERNAME
|
|
|
|
password_secret: GAR_JSON_KEY
|
2020-12-22 05:21:32 -05:00
|
|
|
-
|
|
|
|
registry: gcr.io
|
|
|
|
slug: gcr.io/sandbox-298914/test-docker-action
|
|
|
|
username_secret: GCR_USERNAME
|
|
|
|
password_secret: GCR_JSON_KEY
|
2022-01-27 05:38:06 -05:00
|
|
|
-
|
|
|
|
registry: officialgithubactions.azurecr.io
|
|
|
|
slug: officialgithubactions.azurecr.io/test-docker-action
|
|
|
|
username_secret: AZURE_CLIENT_ID
|
|
|
|
password_secret: AZURE_CLIENT_SECRET
|
2020-11-19 04:40:39 -05:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Docker meta
|
2021-03-29 08:33:52 -04:00
|
|
|
id: meta
|
2021-05-10 12:01:34 -04:00
|
|
|
uses: docker/metadata-action@v3
|
2020-11-19 04:40:39 -05:00
|
|
|
with:
|
|
|
|
images: ${{ matrix.slug }}
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
-
|
|
|
|
name: Login to Registry
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: ${{ matrix.registry }}
|
|
|
|
username: ${{ secrets[matrix.username_secret] }}
|
|
|
|
password: ${{ secrets[matrix.password_secret] }}
|
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
2021-03-28 10:43:51 -04:00
|
|
|
file: ./test/multi.Dockerfile
|
2020-11-19 04:40:39 -05:00
|
|
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2021-03-29 08:33:52 -04:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2020-12-17 08:56:10 -05:00
|
|
|
cache-from: type=registry,ref=${{ matrix.slug }}:master
|
|
|
|
cache-to: type=inline
|
2020-11-19 04:40:39 -05:00
|
|
|
-
|
|
|
|
name: Inspect image
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
run: |
|
2021-03-29 08:33:52 -04:00
|
|
|
docker pull ${{ matrix.slug }}:${{ steps.meta.outputs.version }}
|
|
|
|
docker image inspect ${{ matrix.slug }}:${{ steps.meta.outputs.version }}
|
2020-11-19 04:40:39 -05:00
|
|
|
-
|
|
|
|
name: Check manifest
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
run: |
|
2021-03-29 08:33:52 -04:00
|
|
|
docker buildx imagetools inspect ${{ matrix.slug }}:${{ steps.meta.outputs.version }}
|
2020-11-19 04:40:39 -05:00
|
|
|
-
|
|
|
|
name: Dump context
|
|
|
|
if: always()
|
|
|
|
uses: crazy-max/ghaction-dump-context@v1
|