Skip to content

Commit

Permalink
Multiple tags in latest run (currently 2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkratz committed Jul 2, 2023
1 parent fef8cd1 commit b33ae65
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- '!feature/**'
- '!hotfix/**'

env:
LATEST_TAG: 2023

jobs:
build-and-push-base:
runs-on: [ubuntu-22.04]
Expand Down Expand Up @@ -48,20 +51,25 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
- if: matrix.year != $LATEST_TAG
name: Build image
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.year }}
push: true
tags: maxkratz/texlive:${{ matrix.year }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
- if: matrix.year == '2023'
name: Push latest
run: |
docker pull maxkratz/texlive:${{ matrix.year }}
docker tag maxkratz/texlive:${{ matrix.year }} maxkratz/texlive:latest
docker push maxkratz/texlive:latest
- if: matrix.year == $LATEST_TAG
name: Build image
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.year }}
push: true
tags: |
maxkratz/texlive:${{ matrix.year }}
maxkratz/texlive:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7

# 2016 can not be built with arm64 support
build-and-push-2016-mage:
runs-on: [ubuntu-22.04]
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- 'feature/**'
- 'hotfix/**'

env:
LATEST_TAG: 2023

jobs:
build-base:
runs-on: [ubuntu-22.04]
Expand Down Expand Up @@ -38,13 +41,24 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build image
- if: matrix.year != $LATEST_TAG
name: Build image
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.year }}
push: false
tags: maxkratz/texlive:${{ matrix.year }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
- if: matrix.year == $LATEST_TAG
name: Build image
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.year }}
push: false
tags: |
maxkratz/texlive:${{ matrix.year }}
maxkratz/texlive:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7

# 2016 can not be built with arm64 support
build-2016-image:
Expand Down

0 comments on commit b33ae65

Please sign in to comment.