aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2024-01-13 11:19:09 +0100
committerJakob Borg <jakob@kastelo.net>2024-01-13 11:24:59 +0100
commit36e08f8eee35b673bdc55e34f1d865e68edd793d (patch)
tree175efe8c7bbb902294612d436f1ba2eb2e9dc98a
parent8b321387c082c178a85c8bd1b4047ff95e7a63e3 (diff)
downloadsyncthing-36e08f8eee35b673bdc55e34f1d865e68edd793d.tar.gz
syncthing-36e08f8eee35b673bdc55e34f1d865e68edd793d.zip
build: Testing infra images for infra-* branches
-rw-r--r--.github/workflows/build-infra-dockers.yaml15
1 files changed, 14 insertions, 1 deletions
diff --git a/.github/workflows/build-infra-dockers.yaml b/.github/workflows/build-infra-dockers.yaml
index b5dd18c10..9af9fc990 100644
--- a/.github/workflows/build-infra-dockers.yaml
+++ b/.github/workflows/build-infra-dockers.yaml
@@ -4,6 +4,7 @@ on:
push:
branches:
- infrastructure
+ - infra-*
env:
GO_VERSION: "~1.21.5"
@@ -14,6 +15,7 @@ env:
jobs:
docker-syncthing:
name: Build and push Docker images
+ if: github.repository == 'syncthing/syncthing'
runs-on: ubuntu-latest
environment: docker
strategy:
@@ -49,6 +51,17 @@ 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:
@@ -56,6 +69,6 @@ jobs:
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 }}