File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7+ tags :
8+ - ' *'
9+
710 workflow_dispatch : # allow manual trigger to workflow
811
912jobs :
4649 DOCKER_PASSWORD : ${{secrets.DOCKER_ACCESS_TOKEN}}
4750 run : |
4851 echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
52+
53+ - name : Determine Docker Image Name
54+ id : image
55+ run : |
56+ if [[ "${{github.ref_name}}" == "master" ]]; then
57+ echo "name= xinfinorg/xdcsubnets:latest" >> $GITHUB_OUTPUT
58+ else
59+ echo "name= xinfinorg/xdcsubnets:${{github.ref_name}}" >> $GITHUB_OUTPUT
60+ fi
61+
4962 - name : Build and push image
5063 run : |
51- docker build -t xdc-subnet -f docker/Dockerfile .
52- docker tag xdc-subnet:latest xinfinorg/xdcsubnets:latest
53- docker push xinfinorg/xdcsubnets:latest
64+ docker build . --file Dockerfile --tag ${{ steps.image.outputs.name }}
65+ docker push ${{ steps.image.outputs.name }}
You can’t perform that action at this time.
0 commit comments