Skip to content

Commit a72b788

Browse files
authored
ci: Update on_master workflow conditions (#809)
## 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 2686636 commit a72b788

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
@@ -17,8 +17,8 @@ jobs:
1717
uses: ./.github/workflows/_check_docs.yaml
1818

1919
doc_release:
20-
# Skip this for non-docs commits and forks.
21-
if: "startsWith(github.event.head_commit.message, 'docs') && startsWith(github.repository, 'apify/')"
20+
# Skip this for non-"docs" commits.
21+
if: startsWith(github.event.head_commit.message, 'docs')
2222
name: Doc release
2323
needs: [doc_checks]
2424
uses: ./.github/workflows/_release_docs.yaml
@@ -32,15 +32,20 @@ jobs:
3232
uses: ./.github/workflows/_check_code.yaml
3333

3434
tests:
35-
# Skip this for "ci" and "docs" commits.
36-
if: "!startsWith(github.event.head_commit.message, 'ci') && !startsWith(github.event.head_commit.message, 'docs')"
35+
# Skip this for "docs" commits.
36+
if: "!startsWith(github.event.head_commit.message, 'docs')"
3737
name: Tests
3838
uses: ./.github/workflows/_tests.yaml
3939
secrets: inherit
4040

4141
release_prepare:
42-
# Skip this for "ci", "docs" and "test" commits and for forks.
43-
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/')"
42+
# Run this only for "feat", "fix", "perf", "refactor" and "style" commits.
43+
if: >-
44+
startsWith(github.event.head_commit.message, 'feat') ||
45+
startsWith(github.event.head_commit.message, 'fix') ||
46+
startsWith(github.event.head_commit.message, 'perf') ||
47+
startsWith(github.event.head_commit.message, 'refactor') ||
48+
startsWith(github.event.head_commit.message, 'style')
4449
name: Release prepare
4550
needs: [code_checks, tests]
4651
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)