From 12cc7510825f7105f18decfacf71d8ad40fadd0c Mon Sep 17 00:00:00 2001 From: Lewis Larsen Date: Sun, 29 Dec 2024 17:53:05 +0000 Subject: [PATCH] wip --- .github/workflows/duster-fix-blame.yml | 5 ++--- .github/workflows/prettier.yml | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/duster-fix-blame.yml b/.github/workflows/duster-fix-blame.yml index 1c64f27c..33f4059a 100644 --- a/.github/workflows/duster-fix-blame.yml +++ b/.github/workflows/duster-fix-blame.yml @@ -3,8 +3,6 @@ on: workflow_call: workflow_dispatch: -# Commits made in here will not trigger any workflows -# Checkout Duster's documentation for a workaround jobs: duster: runs-on: ubuntu-latest @@ -15,7 +13,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + # Use `github.ref` for PR refs and `github.head_ref` for normal branches + ref: ${{ github.event.pull_request.head.ref || github.ref_name }} - name: "Duster Fix" uses: tighten/duster-action@v3 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 644868c1..5754f846 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -8,7 +8,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + # Use PR head ref for pull requests or ref_name for normal branches + ref: ${{ github.event.pull_request.head.ref || github.ref_name }} - uses: actions/setup-node@v4 with: node-version: "20.x" @@ -20,4 +21,4 @@ jobs: commit_message: "style: automated changes to blade files" commit_user_name: GitHub Action commit_user_email: actions@github.com - branch: ${{ github.head_ref }} + branch: ${{ github.event.pull_request.head.ref || github.ref_name }}