Skip to content

Run

Run #11

Workflow file for this run

# Helper workflow to trigger rcc for each commit on a branch
on:
push:
branches:
- each-*
name: rcc
jobs:
rcc-smoke:
runs-on: ubuntu-24.04
outputs:
sha: ${{ steps.commit.outputs.sha }}
versions-matrix: ${{ steps.versions-matrix.outputs.matrix }}
dep-suggests-matrix: ${{ steps.dep-suggests-matrix.outputs.matrix }}
name: "Trigger rcc workflow for each commit"
# Begin custom: services
# End custom: services
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
- name: Enumerate all commits from the repository's main branch
run: |
# Get name of main branch of repository
# origin/HEAD isn't known here
main=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
commits=$(git log --pretty=format:"%H" origin/${main}.. --)
echo $commits
# Run workflow for each commit where the status isn't "pending" or "success"
for commit in $commits; do
status=$(gh api repos/${GITHUB_REPOSITORY}/commits/${commit}/status | jq -r '.state')
if [[ $status != "pending" && $status != "success" ]]; then
echo "Running rcc for commit $commit"
gh workflow run rcc.yaml -f ref=$commit
fi
done
shell: bash