Skip to content

Commit f4eda12

Browse files
committed
chore(ci): Align GitHub workflows across Python projects
1 parent 3f20af4 commit f4eda12

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

.github/workflows/build_and_deploy_docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
type: string
1010

1111
env:
12-
NODE_VERSION: 20
12+
NODE_VERSION: 22
1313
PYTHON_VERSION: 3.14
1414

1515
jobs:

.github/workflows/pre_release.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717

1818
jobs:
1919
release_metadata:
20+
if: "!startsWith(github.event.head_commit.message, 'docs') && !startsWith(github.event.head_commit.message, 'ci') && startsWith(github.repository, 'apify/')"
2021
name: Prepare release metadata
2122
runs-on: ubuntu-latest
2223
outputs:
@@ -31,18 +32,13 @@ jobs:
3132
release_type: prerelease
3233
existing_changelog_path: CHANGELOG.md
3334

34-
# If github.ref points to a [ci skip] commit, this workflow won't run.
35-
# Otherwise, these checks will be launched from the `run_code_checks` workflow.
36-
wait_for_checks:
37-
name: Wait for code checks to pass
38-
uses: apify/workflows/.github/workflows/wait_for_checks.yaml@wait-for-checks-action
39-
with:
40-
ref: ${{ github.ref }}
41-
check-regexp: "( check| tests)$"
35+
run_code_checks:
36+
name: Run code checks
37+
uses: ./.github/workflows/run_code_checks.yaml
4238

4339
update_changelog:
4440
name: Update changelog
45-
needs: [release_metadata, wait_for_checks]
41+
needs: [release_metadata, run_code_checks]
4642
uses: apify/workflows/.github/workflows/python_bump_and_update_changelog.yaml@main
4743
with:
4844
version_number: ${{ needs.release_metadata.outputs.version_number }}
@@ -60,7 +56,7 @@ jobs:
6056
publish_to_pypi:
6157
if: "!startsWith(github.event.head_commit.message, 'ci') && !startsWith(github.event.head_commit.message, 'docs')"
6258
name: Publish to PyPI
63-
needs: [release_metadata, update_changelog]
59+
needs: [release_metadata, run_code_checks, update_changelog]
6460
runs-on: ubuntu-latest
6561
permissions:
6662
contents: write

.github/workflows/run_code_checks.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ on:
66
# step required for PRs from forks. This prevents their potential exposure.
77
pull_request:
88

9-
# Pushing to the master branch triggers code checks
10-
push:
11-
branches:
12-
- master
13-
tags-ignore:
14-
- "**" # Ignore all tags to prevent duplicate checks when tags are pushed.
9+
# Trigger for pushing to the master branch is handled by the pre-release workflow.
1510

1611
# It should also be possible to trigger checks manually
1712
workflow_dispatch:
1813

14+
# Allow this workflow to be invoked as a reusable workflow from other workflows
15+
workflow_call:
16+
1917
jobs:
2018
actions_lint_check:
2119
name: Actions lint check

0 commit comments

Comments
 (0)