mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
CI: Extract docker platforms to env variable
This commit is contained in:
7
.github/workflows/docker-ci.yml
vendored
7
.github/workflows/docker-ci.yml
vendored
@@ -2,6 +2,9 @@ name: ASF-docker-ci
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
PLATFORMS: linux/amd64,linux/arm,linux/arm64
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -19,11 +22,11 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm,linux/arm64
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
- name: Build Docker image from Dockerfile.Service
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.Service
|
||||
platforms: linux/amd64,linux/arm,linux/arm64
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
5
.github/workflows/docker-publish-latest.yml
vendored
5
.github/workflows/docker-publish-latest.yml
vendored
@@ -5,6 +5,7 @@ on:
|
||||
types: [released]
|
||||
|
||||
env:
|
||||
PLATFORMS: linux/amd64,linux/arm,linux/arm64
|
||||
TAG: latest
|
||||
|
||||
jobs:
|
||||
@@ -43,12 +44,12 @@ 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.Service
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.Service
|
||||
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 }}
|
||||
|
||||
5
.github/workflows/docker-publish-main.yml
vendored
5
.github/workflows/docker-publish-main.yml
vendored
@@ -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 }}
|
||||
|
||||
@@ -6,6 +6,7 @@ on:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
PLATFORMS: linux/amd64,linux/arm,linux/arm64
|
||||
TAG: released
|
||||
|
||||
jobs:
|
||||
@@ -44,11 +45,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 }}
|
||||
|
||||
Reference in New Issue
Block a user