Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(IDX): replace PAT with GitHub App #1097

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
# This image is based on ubuntu:20.04
container: ghcr.io/dfinity/dre/actions-runner:3dd4f38f076cad73fdcc68ad37fd29bed4fa3e4d
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 2
Expand All @@ -41,7 +47,7 @@ jobs:
- name: "🚀 Building"
uses: ./.github/workflows/build
with:
GITHUB_TOKEN: "${{ secrets.GIX_CREATE_PR_PAT }}"
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
- name: "🚀 Testing"
env:
STAGING_PRIVATE_KEY_PEM: "${{ secrets.STAGING_PRIVATE_KEY_PEM }}"
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pull-request-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ jobs:
name: autoupdate
runs-on: ubuntu-22.04
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- uses: chinthakagodawita/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GIX_CREATE_PR_PAT }}"
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
MERGE_MSG: "Branch was auto-updated."
RETRY_COUNT: "5"
RETRY_SLEEP: "1000"
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/update-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ jobs:
runs-on: ubuntu-20.04
container: ghcr.io/dfinity/dre/actions-runner:3dd4f38f076cad73fdcc68ad37fd29bed4fa3e4d
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- uses: actions/checkout@v4
- name: "🔧 Setup runner"
uses: ./.github/workflows/manage-runner-pre
Expand Down Expand Up @@ -56,7 +62,7 @@ jobs:
branch: bot-update-deps
title: "chore: Update dependencies"
body: "This PR updates Python, Rust crates, and IC repository dependencies"
token: ${{ secrets.GIX_CREATE_PR_PAT }}
token: ${{ steps.app-token.outputs.token }}

- name: "🪓 Tear down runner"
uses: ./.github/workflows/manage-runner-post
Loading