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
22
33on :
44 push :
88 release :
99 types : [published]
1010
11- permissions :
12- packages : write
13- contents : read
14-
1511jobs :
1612 build-main :
1713 runs-on : ubuntu-latest
@@ -28,11 +24,20 @@ jobs:
2824 username : ${{ secrets.DOCKERHUB_USERNAME }}
2925 password : ${{ secrets.DOCKERHUB_TOKEN }}
3026
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+
3136 - name : Build and Push Docker Image
32373338 with :
3439 platforms : linux/amd64,linux/arm64
3540 push : true
36- tags : makeplane/iframely:latest
41+ tags : makeplane/iframely:${{ env.TAG_NAME }}
3742 env :
3843 DOCKER_BUILDKIT : 1
You can’t perform that action at this time.
0 commit comments