mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 17:24:45 +00:00
security(ci): pin mislav/bump-homebrew-formula-action to SHA (#187)
* security(ci): pin third-party GitHub Action Pin mislav/bump-homebrew-formula-action to a full commit SHA and add Dependabot updates for GitHub Actions. * ci: fix checkout for fork PRs Use merge ref for forked pull requests and skip auto-commit when the PR comes from a fork.
This commit is contained in:
5
.github/workflows/quality.yml
vendored
5
.github/workflows/quality.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
ref: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.head_ref) || github.ref }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Cache Homebrew
|
||||
@@ -48,6 +48,7 @@ jobs:
|
||||
echo "✓ All code formatted"
|
||||
|
||||
- name: Commit formatting changes
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
run: |
|
||||
git config user.name "Tw93"
|
||||
git config user.email "tw93@qq.com"
|
||||
@@ -69,7 +70,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
ref: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.head_ref) || github.ref }}
|
||||
|
||||
- name: Cache Homebrew
|
||||
uses: actions/cache@v4
|
||||
|
||||
Reference in New Issue
Block a user