Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on:
# The release workflow starts CI on release PRs, which start no workflows themselves.
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
push:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
group: ${{ github.workflow }}-release-pr
cancel-in-progress: false
permissions:
actions: write
contents: write
pull-requests: write
steps:
Expand All @@ -32,6 +33,20 @@ jobs:
manifest-file: .release-please-manifest.json
skip-github-release: true

# A PR that GITHUB_TOKEN opens starts no workflows, so start CI on each
# open release PR here. Its results show on the release PR.
- name: Run CI on the release PR
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
gh pr list --repo "$GITHUB_REPOSITORY" --state open --author app/github-actions \
--label "autorelease: pending" --json headRefName --jq '.[].headRefName' |
while read -r branch; do
echo "Starting CI on $branch"
gh workflow run ci.yml --repo "$GITHUB_REPOSITORY" --ref "$branch"
done

detect:
name: Detect a release
runs-on: ubuntu-latest
Expand Down
Loading