File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
- name : Docker Image CI
1
+ name : DockerHub Image CI
2
2
3
3
on :
4
4
push :
8
8
release :
9
9
types : [published]
10
10
11
- permissions :
12
- packages : write
13
- contents : read
14
-
15
11
jobs :
16
12
build-main :
17
13
runs-on : ubuntu-latest
@@ -28,11 +24,20 @@ jobs:
28
24
username : ${{ secrets.DOCKERHUB_USERNAME }}
29
25
password : ${{ secrets.DOCKERHUB_TOKEN }}
30
26
27
+ - name : Extract metadata (tags, labels)
28
+ id : meta
29
+ run : |
30
+ if [[ "${{ github.event_name }}" == "push" ]]; then
31
+ echo "TAG_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
32
+ elif [[ "${{ github.event_name }}" == "release" ]]; then
33
+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
34
+ fi
35
+
31
36
- name : Build and Push Docker Image
32
37
33
38
with :
34
39
platforms : linux/amd64,linux/arm64
35
40
push : true
36
- tags : makeplane/iframely:latest
41
+ tags : makeplane/iframely:${{ env.TAG_NAME }}
37
42
env :
38
43
DOCKER_BUILDKIT : 1
You can’t perform that action at this time.
0 commit comments