ci: Gate manual release workflows on wait-for-checks (#70) #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI (master) | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags-ignore: | |
| - "**" # Ignore all tags to avoid duplicate executions triggered by tag pushes. | |
| jobs: | |
| checks: | |
| name: Checks | |
| uses: ./.github/workflows/_checks.yaml | |
| with: | |
| # Skip the test suite for "ci" and "docs" commits — they don't change runtime behavior. | |
| run_tests: >- | |
| ${{ | |
| !startsWith(github.event.head_commit.message, 'ci') && | |
| !startsWith(github.event.head_commit.message, 'docs') | |
| }} | |
| # The beta release is dispatched as a separate workflow run (instead of calling `manual_release_beta.yaml` via `uses:`) | |
| # because PyPI's Trusted Publishing does not currently support reusable workflows. | |
| # See: https://docs.pypi.org/trusted-publishers/troubleshooting/#reusable-workflows-on-github | |
| beta_release: | |
| # Skip this for "ci", "docs" and "test" commits and for forks. | |
| 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/')" | |
| name: Beta release | |
| needs: [checks] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write # Required by execute-workflow. | |
| steps: | |
| - name: Dispatch beta release workflow | |
| uses: apify/actions/execute-workflow@v1.1.2 | |
| with: | |
| workflow: manual_release_beta.yaml |