diff options
| author | Mister_X <MisterX2000@users.noreply.github.com> | 2025-04-02 01:20:26 +0200 |
|---|---|---|
| committer | Mister_X <MisterX2000@users.noreply.github.com> | 2025-04-02 01:20:26 +0200 |
| commit | 1777828f6b847fd50d7be48d32ecb152d4bdb01e (patch) | |
| tree | 3f4c6af335154e8d542fd1a507cc621d4101dc4b /.github/workflows | |
| parent | 3d8db799bc90fbd21a17280b2a85c9535cacace0 (diff) | |
fix action
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build-docker-image.yaml | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml index 82a65cf71..942f86fcc 100644 --- a/.github/workflows/build-docker-image.yaml +++ b/.github/workflows/build-docker-image.yaml @@ -2,7 +2,7 @@ name: Build Docker Image on: push: - branches: + branches: - "**" tags: - "v*.*.*" @@ -19,22 +19,17 @@ jobs: strategy: fail-fast: false matrix: - dockerfile: - - name: Dockerfile - tag: - platform: linux/amd64 - - name: Dockerfile.aarch64 - tag: aarch64 - platform: linux/arm64 - - name: Dockerfile.alpine - tag: alpine - platform: linux/amd64,linux/arm64 - - name: Dockerfile.ArchLinux - tag: archlinux - platform: linux/amd64,linux/arm64 - - name: Dockerfile.armv7 - tag: armv7 - platform: linux/arm/v7 + include: + - tag: "" # Default Dockerfile + platforms: linux/amd64 + - tag: aarch64 + platforms: linux/arm64 + - tag: alpine + platforms: linux/amd64,linux/arm64 + - tag: archlinux + platforms: linux/amd64,linux/arm64 + - tag: armv7 + platforms: linux/arm/v7 runs-on: ubuntu-latest steps: - name: Docker meta @@ -48,7 +43,7 @@ jobs: flavor: | latest=auto prefix= - suffix=-${{ matrix.dockerfile.tag }} + suffix=${{ matrix.tag != '' && format('-{0}', matrix.tag) || '' }} tags: | type=schedule type=ref,event=branch @@ -65,7 +60,7 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -75,10 +70,11 @@ jobs: - name: Build and push uses: docker/build-push-action@v6 with: - platforms: ${{ matrix.dockerfile.platform }} - file: docker/${{ matrix.dockerfile.name }} + # Use "Dockerfile" if matrix.tag is empty, otherwise use "Dockerfile.{tag}" + file: docker/${{ matrix.tag == '' && 'Dockerfile' || format('Dockerfile.{0}', matrix.tag) }} + platforms: ${{ matrix.platforms }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max
\ No newline at end of file + cache-to: type=gha,mode=max |
