CI: Extract docker platforms to env variable

This commit is contained in:
Archi
2021-05-20 23:47:22 +02:00
parent feb73a94aa
commit 0159a918cd
4 changed files with 14 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ on:
- main
env:
PLATFORMS: linux/amd64,linux/arm,linux/arm64
TAG: main
jobs:
@@ -43,11 +44,11 @@ jobs:
echo "GHCR_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and push Docker image
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm,linux/arm64
platforms: ${{ env.PLATFORMS }}
build-args: STEAM_TOKEN_DUMPER_TOKEN=${{ secrets.STEAM_TOKEN_DUMPER_TOKEN }}
labels: |
org.opencontainers.image.created=${{ env.DATE_ISO8601 }}