Fix GBP and auto changelog workflows not working (#96667)

## About The Pull Request

The `pull_request_target` trigger by default checks out the head ref of
the PR but runs with the secrets of the base ref, which a bad actor can
take advantage of, GitHub blocks the most common vector of this by
default now. Changes the workflows to explicitly check out the base ref
(the branch being PRed to, instead of the branch being PRed) because
neither of these jobs specifically requires that it be the head ref
being checked out

## Why It's Good For The Game

Changelogs and GBP will work again

## Changelog

No
This commit is contained in:
Roxy
2026-06-27 19:39:08 -04:00
parent 4d094d342d
commit 2ecb26fb02
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ github.base_ref }}
- name: Generate App Token
id: app-token-generation
+4
View File
@@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ github.base_ref }}
- name: Run Auto Labeler
uses: actions/github-script@v9
with:
@@ -41,6 +43,8 @@ jobs:
- name: Checkout
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/checkout@v7
with:
ref: ${{ github.base_ref }}
- name: Setup git
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |