mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 19:29:15 +00:00
Use a ghaction matrix in docker build
to build each architecture individually
This commit is contained in:
committed by
GitHub
parent
e29beea1ff
commit
3224cc8ce7
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -1,8 +1,5 @@
|
||||
name: Docker builds
|
||||
|
||||
env:
|
||||
TARGET_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 10 * * *" # everyday at 10am
|
||||
@@ -17,6 +14,15 @@ jobs:
|
||||
build:
|
||||
name: Build and deploy docker images
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
target_platform:
|
||||
- "linux/amd64"
|
||||
- "linux/arm/v6"
|
||||
- "linux/arm/v7"
|
||||
- "linux/arm64"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -26,14 +32,14 @@ jobs:
|
||||
id: cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ secrets.CACHE_KEY }}-${{ github.sha }}
|
||||
key: ${{ runner.os }}-buildx-${{ secrets.CACHE_KEY }}-${{ matrix.target_platform }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ secrets.CACHE_KEY }}-
|
||||
${{ runner.os }}-buildx-${{ secrets.CACHE_KEY }}-${{ matrix.target_platform }}-
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: ${{ env.TARGET_PLATFORMS }}
|
||||
platforms: ${{ matrix.target_platform }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
@@ -43,7 +49,7 @@ jobs:
|
||||
run: |
|
||||
DOCKER_USERNAME=viktorstrate
|
||||
DOCKER_IMAGE=viktorstrate/photoview
|
||||
DOCKER_PLATFORMS=${TARGET_PLATFORMS}
|
||||
DOCKER_PLATFORMS=${{ matrix.target_platform }}
|
||||
VERSION=edge
|
||||
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user