Skip to content

Commit 0e1b5a5

Browse files
committed
Use output variable to get version
1 parent ee297d6 commit 0e1b5a5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ jobs:
1717

1818
- name: Build the image
1919
run: docker build -t mendhak/test-image .
20-
- name: Get the tag name
21-
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
20+
- name: Get the version
21+
id: get_version
22+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
2223
- name: Log in to Docker Hub
2324
uses: docker/login-action@v1
2425
with:
2526
username: ${{ secrets.DOCKER_HUB_USERNAME }}
2627
password: ${{ secrets.DOCKER_HUB_TOKEN }}
2728
- name: echo the tag
28-
run: echo ${{ env.TAG }}
29+
run: echo ${{ steps.get_version.outputs.VERSION }}
2930
# - name: Push to Docker Hub
3031
# uses: docker/build-push-action@v2
3132
# with:

0 commit comments

Comments
 (0)