Skip to content

Commit

Permalink
fix(ci): allow commits on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Nov 26, 2024
1 parent 34d1c87 commit 887fc69
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ jobs:
permissions:
actions: write
contents: write
runs-on: ubuntu-22.04
pull-requests: write
runs-on: ubuntu-latest
env:
branch_is_not_master: ${{ github.ref_name != 'master' }}
steps:
- name: Checkout this repo
uses: actions/checkout@v4
Expand All @@ -27,10 +30,16 @@ jobs:
purge-primary-key: never
- name: Remove old cache profiles
run: rm -rf /nix/var/nix/profiles/cache
- name: Configure git for github-actions
- name: Configure git
if: always() && env.branch_is_not_master && runner.os == 'Linux'
env:
# required for gh
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
${{ github.head_ref && format('gh pr checkout {0}', github.event.pull_request.number) || ''}}
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Pull latest changes
run: git pull --rebase --autostash
- name: Update flake locks
Expand Down

0 comments on commit 887fc69

Please sign in to comment.