mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
github-actions: build docker platforms together (#3426)
* github-actions: build docker platforms together * only on main
This commit is contained in:
parent
db426072b0
commit
507dbbdcf2
1 changed files with 2 additions and 5 deletions
7
.github/workflows/docker.yaml
vendored
7
.github/workflows/docker.yaml
vendored
|
@ -5,7 +5,6 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
|
@ -13,7 +12,6 @@ jobs:
|
|||
matrix:
|
||||
platform: [ubuntu-latest]
|
||||
dockerfile: [Dockerfile, Dockerfile.debug]
|
||||
dockerplatform: [linux/amd64, linux/arm64]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
|
@ -52,7 +50,7 @@ jobs:
|
|||
TAGS=${TAGS},${IMAGE}:${SHA_TAG}
|
||||
fi
|
||||
TS=$(date +%Y%m%d%H%M%S)
|
||||
BUILDCACHE_TAG=buildcache-$(echo -n "$DOCKERFILE-$DOCKERPLATFORM" | sha1sum | awk '{print $1}')
|
||||
BUILDCACHE_TAG=buildcache-$(echo -n "$DOCKERFILE" | sha1sum | awk '{print $1}')
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=timestamp::${TS}
|
||||
echo ::set-output name=name::pomerium
|
||||
|
@ -61,7 +59,6 @@ jobs:
|
|||
echo ::set-output name=buildcache-tag::${BUILDCACHE_TAG}
|
||||
env:
|
||||
DOCKERFILE: ${{ matrix.dockerfile }}
|
||||
DOCKERPLATFORM: ${{ matrix.dockerplatform }}
|
||||
|
||||
- name: Docker Publish
|
||||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
|
||||
|
@ -69,7 +66,7 @@ jobs:
|
|||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
platforms: ${{ matrix.dockerplatform }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
labels: |
|
||||
org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue