Skip to content

Commit 79deb3a

Browse files
committed
fix: use env. in github actions
1 parent ee4c90c commit 79deb3a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/main.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7+
8+
env:
9+
owner: jdockerty
10+
711
jobs:
812
push-image:
913
runs-on: ubuntu-latest
@@ -14,16 +18,17 @@ jobs:
1418
- name: Get tag
1519
id: tag
1620
uses: dawidd6/action-get-tag@v1.1.0
21+
with:
22+
strip_v: true
1723
- name: Login to Docker Hub
1824
uses: docker/login-action@v2
1925
with:
20-
username: $GITHUB_REPOSITORY_OWNER
26+
username: ${{ env.owner }}
2127
password: ${{ secrets.DOCKERHUB_TOKEN }}
2228

2329
- name: Build and push Docker image
2430
uses: docker/build-push-action@v3.2.0
2531
with:
2632
context: .
2733
push: true
28-
tags: |
29-
$GITHUB_REPOSITORY_OWNER/contributed-to:api-${{ steps.tag.outputs.tag }}
34+
tags: ${{ env.owner }}/contributed-to:api-${{ steps.tag.outputs.tag }}

0 commit comments

Comments
 (0)