Skip to content

Commit

Permalink
.github/workflows: Fix each commit CI job
Browse files Browse the repository at this point in the history
By fetching the full history and checking out the HEAD commit of the
branch we fix it and using the action parameters is also less code.

Broken since its introduction in c3e7dc3 (.github/workflows: Add job to
compile test each commit, 2023-12-22).

In addition we also need to pass --quit to git rebase as --abort resets
HEAD which we don't want.

Close #1968
  • Loading branch information
t-b committed Jan 9, 2024
1 parent 5cf0aad commit 780a893
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/test-igor-rebase-exec-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,14 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Fetch latest changes for main
run: git fetch origin main
- name: Fetch latest changes of branch
run: git fetch origin $GITHUB_HEAD_REF
- name: Checking out branch
run: git checkout -B $GITHUB_HEAD_REF origin/$GITHUB_HEAD_REF
- name: List of commits to operate on
run: git log --pretty=ref origin/main..
- name: Cleanup earlier rebase invocations
run: git rebase --abort 2>/dev/null || true
run: git rebase --quit 2>/dev/null || true
- name: Compile check each commit with ${{ inputs.experiment }}
run: |
git rebase --exec "git log --pretty=ref -n1" \
Expand Down

0 comments on commit 780a893

Please sign in to comment.