Skip to content

Commit

Permalink
alias for 4.11 instead a full identical build
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Nov 11, 2024
1 parent 653a68b commit f1b525d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
fail-fast: false
matrix:
fluentd:
- v1.16-4.8
- v1.16-4.9
- v1.16-4.10
- v1.17-5.0
- version: v1.16-4.8
- version: v1.16-4.9
- version: v1.16-4.10
alias: v1.16-4.11
- version: v1.17-5.0
image-type:
- base
- filters
Expand All @@ -40,9 +41,10 @@ jobs:
flavor: |
latest = false
tags: |
type=raw,value=${{ matrix.fluentd }}-${{ matrix.image-type }}
type=raw,value=${{ matrix.fluentd }}-${{ matrix.image-type }}-build.${{ github.run_number }}
type=raw,value=${{ matrix.fluentd.version }}-${{ matrix.image-type }}
type=raw,value=${{ matrix.fluentd.version }}-${{ matrix.image-type }}-build.${{ github.run_number }}
type=raw,value=${{ !!matrix.fluentd.alias && matrix.fluentd.alias || 'alias' }}-${{ matrix.image-type }},enabled=${{ !!matrix.fluentd.alias }}
type=raw,value=${{ !!matrix.fluentd.alias && matrix.fluentd.alias || 'alias' }}-${{ matrix.image-type }}-build.${{ github.run_number }},enabled=${{ !!matrix.fluentd.alias }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -63,7 +65,7 @@ jobs:
- name: Build and push (${{ matrix.image-type }})
uses: docker/build-push-action@v5
with:
context: ${{ matrix.fluentd }}
context: ${{ matrix.fluentd.version }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ jobs:
fail-fast: false
matrix:
fluentd:
- v1.16-4.8
- v1.16-4.9
- v1.16-4.10
- v1.17-5.0
- version: v1.16-4.8
- version: v1.16-4.9
- version: v1.16-4.10
alias: v1.16-4.11
- version: v1.17-5.0
image-type:
- base
- filters
Expand All @@ -33,14 +34,16 @@ jobs:
flavor: |
latest = false
tags: |
type=raw,value=${{ matrix.fluentd }}-${{ matrix.image-type }}-build.${{ github.run_number }}
type=raw,value=${{ matrix.fluentd }}-${{ matrix.image-type }}
type=raw,value=${{ matrix.fluentd.version }}-${{ matrix.image-type }}
type=raw,value=${{ matrix.fluentd.version }}-${{ matrix.image-type }}-build.${{ github.run_number }}
type=raw,value=${{ !!matrix.fluentd.alias && matrix.fluentd.alias || 'alias' }}-${{ matrix.image-type }},enabled=${{ !!matrix.fluentd.alias }}
type=raw,value=${{ !!matrix.fluentd.alias && matrix.fluentd.alias || 'alias' }}-${{ matrix.image-type }}-build.${{ github.run_number }},enabled=${{ !!matrix.fluentd.alias }}
labels: |
org.opencontainers.image.description=Custom-built Fluentd image for the Logging operator
org.opencontainers.image.title=Fluentd docker image
org.opencontainers.image.authors=kube-logging authors
org.opencontainers.image.documentation=https://kube-logging.dev/docs/
org.opencontainers.image.version=${{ matrix.fluentd }}-${{ matrix.image-type }}
org.opencontainers.image.version=${{ matrix.fluentd.version }}-${{ matrix.image-type }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -56,7 +59,7 @@ jobs:
- name: Build image (${{ matrix.image-type }})
uses: docker/build-push-action@v5
with:
context: ${{ matrix.fluentd }}
context: ${{ matrix.fluentd.version }}
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
Expand Down

0 comments on commit f1b525d

Please sign in to comment.