ci: change how tag is built

This commit is contained in:
will Farrell 2020-12-02 11:50:10 -07:00
parent 92d2c91227
commit 84ce659f86
No known key found for this signature in database
GPG Key ID: 3FC6D79E2208B22A

View File

@ -31,11 +31,11 @@ jobs:
- if: github.ref == 'refs/heads/main' - if: github.ref == 'refs/heads/main'
name: Conditional(Set tag as `latest`) name: Conditional(Set tag as `latest`)
run: echo "tag=latest >> $GITHUB_ENV" run: echo "tag=willfarrell/crontab:latest >> $GITHUB_ENV"
- if: startsWith(github.ref, 'refs/tags/') - if: startsWith(github.ref, 'refs/tags/')
name: Conditional(Set tag as `{version}`) name: Conditional(Set tag as `{version}`)
run: echo "tag=${GITHUB_REF#refs/*/} >> $GITHUB_ENV" run: echo "tag=willfarrell/crontab:${GITHUB_REF#refs/*/} >> $GITHUB_ENV"
- run: echo "$tag" - run: echo "$tag"
@ -48,4 +48,4 @@ jobs:
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true push: true
tags: | tags: |
${{ join(['willfarrell/crontab', env.tag], ':') }} ${{ env.ta }}