Skip to content

Commit 3cac9a0

Browse files
committed
test
1 parent 3424ac3 commit 3cac9a0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/dockerhub-publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
release:
88
types: [published]
99

10+
env:
11+
IS_RELEASE: ${{github.event_name == 'release'}}
12+
1013
jobs:
1114
docker-publish:
1215
runs-on: ubuntu-latest
@@ -25,11 +28,11 @@ jobs:
2528
# username: ${{ secrets.DOCKERHUB_USERNAME }}
2629
# password: ${{ secrets.DOCKERHUB_TOKEN }}
2730
- name: Compute tags
28-
# if: github.event_name == 'release'
29-
run: echo "TAG_VERSION=$(release='${{github.event_name}}' && echo ${release:1})" >> $GITHUB_ENV
31+
if: vars.IS_RELEASE
32+
run: echo "TAG_VERSION=$(release='${{github.event.release.tag_name}}' && echo ${release:1})" >> $GITHUB_ENV
3033
-
3134
name: Print tags
32-
run: echo ${{ (github.event_name == 'release' && format('gruxer/prism:{0},gruxer/prism:latest', github.event.release.tag_name)) || env.TAG_VERSION }}
35+
run: echo ${{(vars.IS_RELEASE && format('gruxer/prism:{0},gruxer/prism:latest', env.TAG_VERSION)) || 'gruxer/prism:master' }}
3336
# -
3437
# name: Build and Push
3538
# uses: docker/build-push-action@v4

0 commit comments

Comments
 (0)