1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 12:41:46 +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:
Aman Thanvi
2025-12-29 03:50:47 -05:00
committed by GitHub
parent 2b30a24ffc
commit 600afbbee8
3 changed files with 10 additions and 3 deletions

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View File

@@ -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

View File

@@ -87,7 +87,7 @@ jobs:
echo "Releasing version: $VERSION (tag: $TAG)"
- name: Update Homebrew formula
uses: mislav/bump-homebrew-formula-action@v3
uses: mislav/bump-homebrew-formula-action@56a283fa15557e9abaa4bdb63b8212abc68e655c # v3.6
with:
formula-name: mole
formula-path: Formula/mole.rb