Skip to content

Commit

Permalink
ci: Update Github auth for CI pipeline (#440)
Browse files Browse the repository at this point in the history
* ci: Update check-version workflow with new GH app

* ci: Update homebrew release with new GH app
  • Loading branch information
AntiD2ta authored Oct 6, 2024
1 parent 8994dad commit f1d4580
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,24 @@ jobs:

steps:
- name: Checkout Sedge repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Authenticate App
id: gh-app
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Run update check script
run: chmod +x ./scripts/check-image-updates.sh && ./scripts/check-image-updates.sh
env:
PAT: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
PAT: ${{ steps.gh-app.outputs.token }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
token: ${{ steps.gh-app.outputs.token }}
commit-message: Update image versions to latest version.
title: "[Update] Update image versions"
reviewers: AntiD2ta, adriantpaez, stdevMac, cbermudez97
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,17 @@ jobs:
chmod +x /home/runner/work/sedge/sedge/homebrew-sedge/scripts/update-homebrew.sh
bash /home/runner/work/sedge/sedge/homebrew-sedge/scripts/update-homebrew.sh
- name: Authenticate App
id: gh-app
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
token: ${{ steps.gh-app.outputs.token }}
commit-message: Update Homebrew to latest release
title: "[Release] Update Homebrew"
reviewers: AntiD2ta, cbermudez97, stdevMac, adriantpaez
Expand Down

0 comments on commit f1d4580

Please sign in to comment.