From 1fc4c9d9c5eca92665d4b75ace8828140a9fcbe6 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 4 Jul 2023 10:27:26 +0200 Subject: [PATCH] build: Only push releases to cloud storage, and also use `latest` --- .github/workflows/build-syncthing.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-syncthing.yaml b/.github/workflows/build-syncthing.yaml index caaefe1df..198101263 100644 --- a/.github/workflows/build-syncthing.yaml +++ b/.github/workflows/build-syncthing.yaml @@ -602,7 +602,7 @@ jobs: publish-release-files: name: Publish release files - if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release') + if: github.event_name == 'push' && github.ref == 'refs/heads/release' environment: signing needs: - sign-for-upgrade @@ -630,7 +630,7 @@ jobs: version=$(go run build.go version) echo "VERSION=$version" >> $GITHUB_ENV - - name: Push to Spaces + - name: Push to Spaces (${{ env.VERSION }}) uses: docker://docker.io/rclone/rclone:latest env: RCLONE_CONFIG_SPACES_TYPE: s3 @@ -642,6 +642,22 @@ jobs: with: args: sync packages spaces:syncthing/release/${{ env.VERSION }} + - name: Push to Spaces (latest) + uses: docker://docker.io/rclone/rclone:latest + env: + RCLONE_CONFIG_SPACES_TYPE: s3 + RCLONE_CONFIG_SPACES_PROVIDER: DigitalOcean + RCLONE_CONFIG_SPACES_ACCESS_KEY_ID: ${{ secrets.SPACES_KEY }} + RCLONE_CONFIG_SPACES_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET }} + RCLONE_CONFIG_SPACES_ENDPOINT: ams3.digitaloceanspaces.com + RCLONE_CONFIG_SPACES_ACL: public-read + with: + args: sync spaces:syncthing/release/${{ env.VERSION }} spaces:syncthing/release/latest + + # + # Build and push to Docker Hub + # + docker-syncthing: name: Build and push Docker images runs-on: ubuntu-latest