|
|
@@ -12,6 +12,10 @@ env:
|
|
|
BUILD_USER: docker
|
|
|
BUILD_HOST: github.syncthing.net
|
|
|
|
|
|
+permissions:
|
|
|
+ contents: read
|
|
|
+ packages: write
|
|
|
+
|
|
|
jobs:
|
|
|
docker-syncthing:
|
|
|
name: Build and push Docker images
|
|
|
@@ -41,6 +45,13 @@ jobs:
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
+ - name: Login to GHCR
|
|
|
+ uses: docker/login-action@v3
|
|
|
+ with:
|
|
|
+ registry: ghcr.io
|
|
|
+ username: ${{ github.actor }}
|
|
|
+ password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+
|
|
|
- name: Build binaries
|
|
|
run: |
|
|
|
for arch in arm64 amd64; do
|
|
|
@@ -53,13 +64,13 @@ jobs:
|
|
|
|
|
|
- name: Set Docker tags (all branches)
|
|
|
run: |
|
|
|
- tags=syncthing/${{ matrix.pkg }}:${{ github.sha }}
|
|
|
+ tags=docker.io/syncthing/${{ matrix.pkg }}:${{ github.sha }},ghcr.io/syncthing/infra/${{ 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 }}
|
|
|
+ tags=docker.io/syncthing/${{ matrix.pkg }}:latest,ghcr.io/syncthing/infra/${{ matrix.pkg }}:latest,${{ env.TAGS }}
|
|
|
echo "TAGS=$tags" >> $GITHUB_ENV
|
|
|
|
|
|
- name: Build and push
|