Skip to content

Commit

Permalink
Update galata-update.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski authored Jul 9, 2024
1 parent c950b51 commit 59ff2a1
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/galata-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,19 @@ jobs:
echo "head_sha=$head_sha" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ steps.pr.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout the branch from the PR that triggered the job
run: gh pr checkout ${{ github.event.issue.number }}

- name: Validate the fetched branch HEAD revision
env:
EXPECTED_SHA: ${{ steps.pr.outputs.head_sha }}
run: |
actual_sha="$(git rev-parse HEAD)"
if [[ "$actual_sha" != "$EXPECTED_SHA" ]]; then
echo "The HEAD of the checked out branch ($actual_sha) differs from the HEAD commit available at the time when trigger comment was submitted ($EXPECTED_SHA)"
exit 1
fi
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down Expand Up @@ -153,12 +161,21 @@ jobs:
echo "head_sha=$head_sha" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
path: core
ref: ${{ steps.pr.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout the branch from the PR that triggered the job
working-directory: core
run: gh pr checkout ${{ github.event.issue.number }}

- name: Validate the fetched branch HEAD revision
working-directory: core
env:
EXPECTED_SHA: ${{ steps.pr.outputs.head_sha }}
run: |
actual_sha="$(git rev-parse HEAD)"
if [[ "$actual_sha" != "$EXPECTED_SHA" ]]; then
echo "The HEAD of the checked out branch ($actual_sha) differs from the HEAD commit available at the time when trigger comment was submitted ($EXPECTED_SHA)"
exit 1
fi
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down

0 comments on commit 59ff2a1

Please sign in to comment.