mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-04 21:37:47 +02:00
ci: unify bot automation on the shared GitHub App
Point contributors.yml at the shared app via client-id (was the old hackbrowserdata-bot app), and replace the long-lived Homebrew PAT with a short-lived app token scoped to homebrew-tap for the formula push.
This commit is contained in:
@@ -18,8 +18,8 @@ jobs:
|
|||||||
uses: actions/create-github-app-token@v3
|
uses: actions/create-github-app-token@v3
|
||||||
id: app-token
|
id: app-token
|
||||||
with:
|
with:
|
||||||
app-id: ${{ secrets.HACKBROWSERDATA_BOT_APP_ID }}
|
client-id: ${{ vars.MOOND4RK_CI_RELEASE_APP_CLIENT_ID }}
|
||||||
private-key: ${{ secrets.HACKBROWSERDATA_BOT_PRIVATE_KEY }}
|
private-key: ${{ secrets.MOOND4RK_CI_RELEASE_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
|
|||||||
@@ -51,6 +51,15 @@ jobs:
|
|||||||
- name: Build ABE payload
|
- name: Build ABE payload
|
||||||
run: make payload
|
run: make payload
|
||||||
|
|
||||||
|
- name: Mint homebrew-tap token
|
||||||
|
id: tap-token
|
||||||
|
uses: actions/create-github-app-token@v3
|
||||||
|
with:
|
||||||
|
client-id: ${{ vars.MOOND4RK_CI_RELEASE_APP_CLIENT_ID }}
|
||||||
|
private-key: ${{ secrets.MOOND4RK_CI_RELEASE_APP_PRIVATE_KEY }}
|
||||||
|
owner: moonD4rk
|
||||||
|
repositories: homebrew-tap
|
||||||
|
|
||||||
- name: Create and push tag
|
- name: Create and push tag
|
||||||
if: inputs.mode == 'release'
|
if: inputs.mode == 'release'
|
||||||
env:
|
env:
|
||||||
@@ -75,7 +84,7 @@ jobs:
|
|||||||
args: release --snapshot --clean
|
args: release --snapshot --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
|
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.tap-token.outputs.token }}
|
||||||
|
|
||||||
- name: Run GoReleaser (release)
|
- name: Run GoReleaser (release)
|
||||||
if: inputs.mode == 'release'
|
if: inputs.mode == 'release'
|
||||||
@@ -85,7 +94,7 @@ jobs:
|
|||||||
args: release --clean ${{ inputs.draft && '--draft' || '' }}
|
args: release --clean ${{ inputs.draft && '--draft' || '' }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
|
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.tap-token.outputs.token }}
|
||||||
|
|
||||||
- name: Upload snapshot artifacts
|
- name: Upload snapshot artifacts
|
||||||
if: inputs.mode == 'snapshot'
|
if: inputs.mode == 'snapshot'
|
||||||
|
|||||||
+2
-2
@@ -101,8 +101,8 @@ brews:
|
|||||||
branch: main
|
branch: main
|
||||||
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
|
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
|
||||||
commit_author:
|
commit_author:
|
||||||
name: "github-actions[bot]"
|
name: "moond4rk-ci[bot]"
|
||||||
email: "github-actions[bot]@users.noreply.github.com"
|
email: "299850723+moond4rk-ci[bot]@users.noreply.github.com"
|
||||||
commit_msg_template: "brew formula update for {{ .ProjectName }} version {{ .Tag }}"
|
commit_msg_template: "brew formula update for {{ .ProjectName }} version {{ .Tag }}"
|
||||||
install: |
|
install: |
|
||||||
bin.install "hack-browser-data"
|
bin.install "hack-browser-data"
|
||||||
|
|||||||
Reference in New Issue
Block a user