Skip to content

Commit

Permalink
build: Testing infra images for infra-* branches
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed Jan 13, 2024
1 parent 32cca86 commit 0e5c444
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build-infra-dockers.yaml
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- infrastructure
- infra-*

env:
GO_VERSION: "~1.21.5"
Expand Down Expand Up @@ -49,13 +50,24 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set Docker tags (all branches)
run: |
tags=syncthing/${{ matrix.pkg }}:${{ github.sha }}
echo "TAGS=$tags" >> $GITHUB_ENV
- name: Set Docker tags (latest)
if: github.ref == 'refs/heads/infrastructure'
run: |
tags=syncthing/${{ matrix.pkg }}:latest,${{ env.TAGS }}
echo "TAGS=$tags" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.${{ matrix.pkg }}
platforms: linux/amd64,linux/arm64
push: true
tags: syncthing/${{ matrix.pkg }}:latest,syncthing/${{ matrix.pkg }}:${{ github.sha }}
tags: ${{ env.TAGS }}
labels: |
org.opencontainers.image.revision=${{ github.sha }}

0 comments on commit 0e5c444

Please sign in to comment.