Skip to content

Commit 97778ac

Browse files
authored
ci: Update on_master workflow conditions (#630)
## Summary - Pre-release runs only for `feat`, `fix`, `perf`, `refactor`, `style` conventional commits (skip all others) - Doc release runs only for `docs` conventional commits (skip all others) - Tests skip only for `docs` conventional commits - `startsWith(github.repository, 'apify/')` is not necessary since it is only the `on_master` trigger. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent aafe161 commit 97778ac

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/on_master.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
uses: ./.github/workflows/_check_docs.yaml
2121

2222
doc_release:
23-
# Skip this for non-docs commits and forks.
24-
if: "startsWith(github.event.head_commit.message, 'docs') && startsWith(github.repository, 'apify/')"
23+
# Skip this for non-"docs" commits.
24+
if: startsWith(github.event.head_commit.message, 'docs')
2525
name: Doc release
2626
needs: [doc_checks]
2727
permissions:
@@ -43,15 +43,20 @@ jobs:
4343
uses: ./.github/workflows/_check_docstrings.yaml
4444

4545
tests:
46-
# Skip this for "ci" and "docs" commits.
47-
if: "!startsWith(github.event.head_commit.message, 'ci') && !startsWith(github.event.head_commit.message, 'docs')"
46+
# Skip this for "docs" commits.
47+
if: "!startsWith(github.event.head_commit.message, 'docs')"
4848
name: Tests
4949
uses: ./.github/workflows/_tests.yaml
5050
secrets: inherit
5151

5252
release_prepare:
53-
# Skip this for "ci", "docs" and "test" commits and for forks.
54-
if: "!startsWith(github.event.head_commit.message, 'ci') && !startsWith(github.event.head_commit.message, 'docs') && !startsWith(github.event.head_commit.message, 'test') && startsWith(github.repository, 'apify/')"
53+
# Run this only for "feat", "fix", "perf", "refactor" and "style" commits.
54+
if: >-
55+
startsWith(github.event.head_commit.message, 'feat') ||
56+
startsWith(github.event.head_commit.message, 'fix') ||
57+
startsWith(github.event.head_commit.message, 'perf') ||
58+
startsWith(github.event.head_commit.message, 'refactor') ||
59+
startsWith(github.event.head_commit.message, 'style')
5560
name: Release prepare
5661
needs: [code_checks, docstrings_checks, tests]
5762
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)