Skip to content

Commit d90e850

Browse files
authored
Merge pull request #14 from carlossg/actions
chore: bump github checkout action
2 parents d3c6cd2 + b35b2c5 commit d90e850

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/publish-container.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ on:
1111
# required: false
1212
# default: true
1313
# type: boolean
14+
pull_request: {}
1415

1516
jobs:
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: |

scripts/auto_publish/compare-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ else
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"
3030
fi

0 commit comments

Comments
 (0)