mirror of
https://github.com/tw93/Mole.git
synced 2026-02-12 00:39:02 +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:
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
5
.github/workflows/quality.yml
vendored
5
.github/workflows/quality.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
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 }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Cache Homebrew
|
- name: Cache Homebrew
|
||||||
@@ -48,6 +48,7 @@ jobs:
|
|||||||
echo "✓ All code formatted"
|
echo "✓ All code formatted"
|
||||||
|
|
||||||
- name: Commit formatting changes
|
- name: Commit formatting changes
|
||||||
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Tw93"
|
git config user.name "Tw93"
|
||||||
git config user.email "tw93@qq.com"
|
git config user.email "tw93@qq.com"
|
||||||
@@ -69,7 +70,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
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
|
- name: Cache Homebrew
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -87,7 +87,7 @@ jobs:
|
|||||||
echo "Releasing version: $VERSION (tag: $TAG)"
|
echo "Releasing version: $VERSION (tag: $TAG)"
|
||||||
|
|
||||||
- name: Update Homebrew formula
|
- name: Update Homebrew formula
|
||||||
uses: mislav/bump-homebrew-formula-action@v3
|
uses: mislav/bump-homebrew-formula-action@56a283fa15557e9abaa4bdb63b8212abc68e655c # v3.6
|
||||||
with:
|
with:
|
||||||
formula-name: mole
|
formula-name: mole
|
||||||
formula-path: Formula/mole.rb
|
formula-path: Formula/mole.rb
|
||||||
|
|||||||
Reference in New Issue
Block a user