Skip to content

Commit 8296126

Browse files
committed
modify workflow
1 parent bf3a945 commit 8296126

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

.github/workflows/auto_image.yml

+16-17
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,26 @@ name: AutoImageWorkflow
66
on:
77
push:
88
tags:
9-
- 'v*' # 这里可以使用通配符,例如 'v*' 表示所有以 'v' 开头的标签
9+
- "v*" # 这里可以使用通配符,例如 'v*' 表示所有以 'v' 开头的标签
1010

1111
jobs:
12-
1312
build:
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: actions/checkout@v4
17-
- name: Get tag version
18-
id: get_tag_version
19-
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
15+
- uses: actions/checkout@v4
16+
- name: Get tag version
17+
id: get_tag_version
18+
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
2019

21-
- name: Docker Login
22-
# You may pin to the exact commit or the version.
23-
# uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
24-
uses: docker/[email protected]
25-
with:
26-
# Username used to log against the Docker registry
27-
username: ${{ DOCKER_HUB_USERNAME }}
28-
# Password or personal access token used to log against the Docker registry
29-
password: ${{ DOCKER_HUB_PASSWORD }}
20+
- name: Docker Login
21+
# You may pin to the exact commit or the version.
22+
# uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
23+
uses: docker/[email protected]
24+
with:
25+
# Username used to log against the Docker registry
26+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
27+
# Password or personal access token used to log against the Docker registry
28+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
3029

31-
- name: Build and push image
32-
run: ./script/image.sh ${{ env.TAG_VERSION }}
30+
- name: Build and push image
31+
run: ./script/image.sh ${{ env.TAG_VERSION }}

0 commit comments

Comments
 (0)