File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1111 # required: false
1212 # default: true
1313 # type: boolean
14+ pull_request : {}
1415
1516jobs :
1617 push_to_registry :
1718 name : Push Docker image to Docker Hub
1819 runs-on : ubuntu-latest
1920 steps :
2021 - name : Check out the repo
21- uses : actions/checkout@v2
22+ uses : actions/checkout@v4
2223 - name : Set up Python 3.10
23- uses : actions/setup-python@v2
24+ uses : actions/setup-python@v5
2425 with :
2526 python-version : ' 3.10'
2627 - name : Install dependencies
@@ -35,17 +36,17 @@ jobs:
3536 if : " ${{ steps.getversion.outputs.version != '' }}"
3637 run : echo ${{ steps.getversion.outputs.version }}
3738 - name : Log in to Docker Hub
38- uses : docker/login-action@v2
39- if : " ${{ steps.getversion.outputs.version != '' }}"
39+ uses : docker/login-action@v3
40+ if : " ${{ steps.getversion.outputs.version != '' && github.event_name != 'pull_request' }}"
4041 with :
4142 username : ${{ secrets.DOCKER_USERNAME }}
4243 password : ${{ secrets.DOCKER_PASSWORD }}
4344 - name : Build and push Docker image
44- uses : docker/build-push-action@v2
45+ uses : docker/build-push-action@v5
4546 if : " ${{ steps.getversion.outputs.version != '' }}"
4647 with :
4748 context : .
48- push : true
49+ push : ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
4950 build-args : |
5051 CZ_VERSION=${{ steps.getversion.outputs.version }}
5152 tags : |
Original file line number Diff line number Diff line change 2626 echo ' Creating file: `VERSION`'
2727 echo " $PIP_LATEST " > VERSION
2828 echo " Setting variable 'version'"
29- echo " ::set-output name= version:: $PIP_LATEST "
29+ echo " version= $PIP_LATEST " >> " $GITHUB_OUTPUT "
3030fi
You can’t perform that action at this time.
0 commit comments