Skip to content

Commit

Permalink
ci: checkout branch for pushdiff action
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 5, 2024
1 parent 704b6aa commit 7a59624
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/actions/pushdiff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ runs:
(!github.event.pull_request.head.repo.fork)
shell: bash
run: |
if ! git status | grep -q "On branch"; then
echo "::error::pushdiff must run on a branch. Pass 'github.head_ref' as 'ref' to the checkout action."
exit 1
fi
git config --global user.name "edgelessci"
git config --global user.email "[email protected]"
git commit -am "${{ inputs.renovate-commit-msg }}"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
token: ${{ !github.event.pull_request.head.repo.fork && secrets.NUNKI_CI_COMMIT_PUSH_PR || '' }}
- name: Install Nix
uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
with:
Expand Down

0 comments on commit 7a59624

Please sign in to comment.