From ad4a142cd829c680a66df6da6a4f1d5f889415d8 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Thu, 12 Dec 2024 18:21:18 +0100 Subject: [PATCH 1/3] Provide token --- .github/workflows/update-jaeger.yml | 6 +++--- scripts/update-jaeger.mts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-jaeger.yml b/.github/workflows/update-jaeger.yml index 8872cd9ea..1b8c51501 100644 --- a/.github/workflows/update-jaeger.yml +++ b/.github/workflows/update-jaeger.yml @@ -9,8 +9,6 @@ jobs: runs-on: ubuntu-latest env: BRANCH_NAME: update-jaeger - DEPENDENCIES_FILENAME: dependencies.json - JAEGER_DIFF_FILENAME: dependencies.diff steps: - uses: actions/checkout@v4 with: @@ -18,10 +16,12 @@ jobs: - name: Update dependencies.json run: | - echo ${{ toJson(github.event.client_payload) }} > dependencies.diff.json + echo ${{ toJson(github.event.client_payload) }} > dependencies_diff.json npm run update-jaeger - name: Commit, push changes and create PR + env: + GH_TOKEN: ${{ secrets.CONTENTS_WRITE_PAT }} run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" diff --git a/scripts/update-jaeger.mts b/scripts/update-jaeger.mts index 90c04f3ed..ce00ecfcf 100644 --- a/scripts/update-jaeger.mts +++ b/scripts/update-jaeger.mts @@ -23,7 +23,7 @@ const readDependencyFile = async (path: string): Promise => { const dependenciesFilePath = path.resolve("./dependencies.json"); const dependencies = await readDependencyFile(dependenciesFilePath); -const dependenciesDiffFilePath = path.resolve("./dependencies.diff.json"); +const dependenciesDiffFilePath = path.resolve("./dependencies_diff.json"); const dependenciesDiff = await readDependencyFile(dependenciesDiffFilePath); const mergedDependencies = { ...dependencies, ...dependenciesDiff }; From 192f0d219b74138825bd7839c0f9e5295eb8ca71 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Thu, 12 Dec 2024 18:30:20 +0100 Subject: [PATCH 2/3] Add body to the pull request --- .github/workflows/update-jaeger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-jaeger.yml b/.github/workflows/update-jaeger.yml index 1b8c51501..78766339c 100644 --- a/.github/workflows/update-jaeger.yml +++ b/.github/workflows/update-jaeger.yml @@ -29,4 +29,4 @@ jobs: git add dependencies.json git commit -m "Update Jaeger dependencies" git push origin ${{ env.BRANCH_NAME }} - gh pr create -t "Update Jaeger dependencies" -B main -H ${{ env.BRANCH_NAME }} + gh pr create -t "Update Jaeger dependencies" -b "Update Jaeger dependencies" -B main -H ${{ env.BRANCH_NAME }} From afc223e372ec347f7d295824e92c97e2fd7ad299 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Thu, 12 Dec 2024 18:37:51 +0100 Subject: [PATCH 3/3] Fix create PR command --- .github/workflows/update-jaeger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-jaeger.yml b/.github/workflows/update-jaeger.yml index 78766339c..141e81a6b 100644 --- a/.github/workflows/update-jaeger.yml +++ b/.github/workflows/update-jaeger.yml @@ -29,4 +29,4 @@ jobs: git add dependencies.json git commit -m "Update Jaeger dependencies" git push origin ${{ env.BRANCH_NAME }} - gh pr create -t "Update Jaeger dependencies" -b "Update Jaeger dependencies" -B main -H ${{ env.BRANCH_NAME }} + gh pr create -f -B main