summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2023-06-14 09:04:39 +0200
committerJakob Borg <jakob@kastelo.net>2023-06-14 09:04:39 +0200
commit472ab4b5caa23af259295655b3367c68bf5aeeb8 (patch)
treef47c7283b85a14db4333df5ab2f6e87e05acce27
parent713b088cc781e5b7264e2607ba4adc6b5d83ce0a (diff)
wip
-rw-r--r--.github/workflows/build-syncthing.yaml20
1 files changed, 19 insertions, 1 deletions
diff --git a/.github/workflows/build-syncthing.yaml b/.github/workflows/build-syncthing.yaml
index b301e4766..c79125c8c 100644
--- a/.github/workflows/build-syncthing.yaml
+++ b/.github/workflows/build-syncthing.yaml
@@ -665,6 +665,24 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
+ - name: Set version tags
+ run: |
+ version=$(go run build.go version)
+ version=${version#v}
+ if [[ $version == @([0-9]|[0-9][0-9]).@([0-9]|[0-9][0-9]).@([0-9]|[0-9][0-9]) ]] ; then
+ echo Release version, pushing to :latest and version tags
+ major=${version%.*.*}
+ minor=${version%.*}
+ tags=syncthing/syncthing:$version,syncthing/syncthing:$major,syncthing/syncthing:$minor,syncthing/syncthing:latest )
+ elif [[ $version == *-rc.@([0-9]|[0-9][0-9]) ]] ; then
+ echo Release candidate, pushing to :rc
+ tags=syncthing/syncthing:rc
+ else
+ echo Development version, pushing to :edge
+ tags=syncthing/syncthing:edge
+ fi
+ echo "DOCKER_TAGS=$tags" >> $GITHUB_ENV
+
- name: Build and push syncthing
uses: docker/build-push-action@v4
with:
@@ -672,4 +690,4 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
- tags: syncthing/syncthing:edge
+ tags: ${{ env.DOCKER_TAGS }}