File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11
11
# required: false
12
12
# default: true
13
13
# type: boolean
14
+ pull_request : {}
14
15
15
16
jobs :
16
17
push_to_registry :
17
18
name : Push Docker image to Docker Hub
18
19
runs-on : ubuntu-latest
19
20
steps :
20
21
- name : Check out the repo
21
- uses : actions/checkout@v2
22
+ uses : actions/checkout@v4
22
23
- name : Set up Python 3.10
23
- uses : actions/setup-python@v2
24
+ uses : actions/setup-python@v5
24
25
with :
25
26
python-version : ' 3.10'
26
27
- name : Install dependencies
@@ -35,17 +36,17 @@ jobs:
35
36
if : " ${{ steps.getversion.outputs.version != '' }}"
36
37
run : echo ${{ steps.getversion.outputs.version }}
37
38
- 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' }}"
40
41
with :
41
42
username : ${{ secrets.DOCKER_USERNAME }}
42
43
password : ${{ secrets.DOCKER_PASSWORD }}
43
44
- name : Build and push Docker image
44
- uses : docker/build-push-action@v2
45
+ uses : docker/build-push-action@v5
45
46
if : " ${{ steps.getversion.outputs.version != '' }}"
46
47
with :
47
48
context : .
48
- push : true
49
+ push : ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
49
50
build-args : |
50
51
CZ_VERSION=${{ steps.getversion.outputs.version }}
51
52
tags : |
Original file line number Diff line number Diff line change 26
26
echo ' Creating file: `VERSION`'
27
27
echo " $PIP_LATEST " > VERSION
28
28
echo " Setting variable 'version'"
29
- echo " ::set-output name= version:: $PIP_LATEST "
29
+ echo " version= $PIP_LATEST " >> " $GITHUB_OUTPUT "
30
30
fi
You can’t perform that action at this time.
0 commit comments