Skip to content

Commit

Permalink
fix(github-workflows): use official GitHub action for token generation
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce Thuilot <[email protected]>
  • Loading branch information
bthuilot committed Dec 10, 2024
1 parent ca2d995 commit 964ffb5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/approved_status.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Send PR Approval Status

permissions:
permissions:
contents: read
pull-requests: write

Expand All @@ -25,13 +25,13 @@ jobs:
steps:
- name: Get GitHub App token
id: get_token
uses: tibdex/github-app-token@v1
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
repository: DataDog/datadog-api-spec
- name: Post PR review status check
uses: DataDog/github-actions/post-review-status@v2
with:
github-token: ${{ steps.get_token.outputs.token }}
repo: datadog-api-spec
repo: datadog-api-spec
8 changes: 4 additions & 4 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
- name: Get GitHub App token
id: get_token
uses: tibdex/github-app-token@v1
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
- uses: actions/checkout@v3

- name: Setup Git
Expand Down Expand Up @@ -114,4 +114,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["changelog/no-changelog"],
});
});
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- name: Get GitHub App token
id: get_token
uses: tibdex/github-app-token@v1
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
- name: Create release
uses: actions/github-script@v6
env:
Expand All @@ -41,4 +41,4 @@ jobs:
repo: context.repo.repo,
generate_release_notes: true,
tag_name: tagName,
});
});
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run Tests

permissions:
permissions:
contents: read

env:
Expand Down Expand Up @@ -30,10 +30,10 @@ jobs:
- name: Get GitHub App token
if: github.event_name == 'pull_request'
id: get_token
uses: tibdex/github-app-token@v2.1.0
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
installation_retrieval_mode: repository
installation_retrieval_payload: DataDog/datadog-api-spec
- uses: actions/checkout@v3
Expand Down Expand Up @@ -115,10 +115,10 @@ jobs:
- name: Get GitHub App token
if: github.event_name == 'pull_request'
id: get_token
uses: tibdex/github-app-token@v2.1.0
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
installation_retrieval_mode: repository
installation_retrieval_payload: DataDog/datadog-api-spec
- name: Post status check
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
- name: Get GitHub App token
if: github.event_name == 'pull_request'
id: get_token
uses: tibdex/github-app-token@v2.1.0
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
installation_retrieval_mode: repository
installation_retrieval_payload: DataDog/datadog-api-spec
- name: Checkout code
Expand Down Expand Up @@ -92,4 +92,4 @@ jobs:
github-token: ${{ steps.get_token.outputs.token }}
repo: datadog-api-spec
status: success
context: integration
context: integration

0 comments on commit 964ffb5

Please sign in to comment.