This commit is contained in:
Jakob Borg 2023-06-14 09:04:39 +02:00
parent 713b088cc7
commit 472ab4b5ca

View File

@ -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 }}