build: Testing infra images for infra-* branches
This commit is contained in:
parent
8b321387c0
commit
36e08f8eee
|
@ -4,6 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- infrastructure
|
- infrastructure
|
||||||
|
- infra-*
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: "~1.21.5"
|
GO_VERSION: "~1.21.5"
|
||||||
|
@ -14,6 +15,7 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
docker-syncthing:
|
docker-syncthing:
|
||||||
name: Build and push Docker images
|
name: Build and push Docker images
|
||||||
|
if: github.repository == 'syncthing/syncthing'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: docker
|
environment: docker
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -49,6 +51,17 @@ jobs:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
@ -56,6 +69,6 @@ jobs:
|
||||||
file: ./Dockerfile.${{ matrix.pkg }}
|
file: ./Dockerfile.${{ matrix.pkg }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: syncthing/${{ matrix.pkg }}:latest,syncthing/${{ matrix.pkg }}:${{ github.sha }}
|
tags: ${{ env.TAGS }}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
|
Loading…
Reference in New Issue