From ba1be0c393f74e1eea2bd1372ee44f2242a7b5e5 Mon Sep 17 00:00:00 2001 From: Bryce Thuilot Date: Tue, 10 Dec 2024 15:01:53 -0500 Subject: [PATCH] fix(github-workflows): use official GitHub action for token generation Signed-off-by: Bryce Thuilot --- .github/workflows/approved_status.yml | 8 ++++---- .github/workflows/prepare_release.yml | 8 ++++---- .github/workflows/release.yml | 8 ++++---- .github/workflows/test.yml | 14 +++++++------- .github/workflows/test_integration.yml | 8 ++++---- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/approved_status.yml b/.github/workflows/approved_status.yml index 11fe488dc0..2310de218a 100644 --- a/.github/workflows/approved_status.yml +++ b/.github/workflows/approved_status.yml @@ -1,6 +1,6 @@ name: Send PR Approval Status -permissions: +permissions: contents: read pull-requests: write @@ -25,10 +25,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 }} repository: DataDog/datadog-api-spec - name: Post PR review status check uses: DataDog/github-actions/post-review-status@v2 diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index 0343e5291e..5f4c2a5727 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -1,6 +1,6 @@ name: Prepare release -permissions: +permissions: contents: write pull-requests: write @@ -17,10 +17,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: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e58bb85fac..14e8fab699 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ name: Release -permissions: +permissions: contents: write pull-requests: write @@ -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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c53d4383d9..2c1d5ba6f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: Run Tests -permissions: +permissions: contents: read env: @@ -29,10 +29,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 with: fetch-depth: 0 @@ -137,10 +137,10 @@ jobs: - name: Get GitHub App token if: github.event_name == 'pull_request' 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 status check uses: DataDog/github-actions/post-status-check@v2 diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index b086b144f5..c270d402f6 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -44,10 +44,10 @@ jobs: - name: Get GitHub App token if: github.event_name == 'pull_request' 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: Checkout code uses: actions/checkout@v3 @@ -84,7 +84,7 @@ jobs: SLEEP_AFTER_REQUEST: ${{ vars.SLEEP_AFTER_REQUEST }} PYTEST_ADDOPTS: "--ddtrace" DD_PYTEST_OPERATION_NAME: "test" - DD_TRACE_PROPAGATION_STYLE_INJECT: "datadog" + DD_TRACE_PROPAGATION_STYLE_INJECT: "datadog" - name: Post failure status check if: failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') uses: DataDog/github-actions/post-status-check@v2