From 57f434ffdfbb853ee840e4dceba6b38a0a6560ec Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 12 Dec 2023 22:42:38 +0100 Subject: [PATCH 1/4] chore: do not use actions-ecosystem/action-add-labels That action seems to be unmaintained and causes warnings (https://github.com/actions-ecosystem/action-add-labels/issues/459). Let's just use the API directly, like we already do in `.github/workflows/labels-from-comments.yml` --- .github/workflows/pr-release.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-release.yml b/.github/workflows/pr-release.yml index 6821c4aa711d..1d43a8b3bbd4 100644 --- a/.github/workflows/pr-release.yml +++ b/.github/workflows/pr-release.yml @@ -71,10 +71,15 @@ jobs: - name: Add label if: ${{ steps.workflow-info.outputs.pullRequestNumber != '' }} - uses: actions-ecosystem/action-add-labels@v1 + uses: actions/github-script@v7 with: - number: ${{ steps.workflow-info.outputs.pullRequestNumber }} - labels: toolchain-available + script: | + await github.rest.issues.addLabels({ + issue_number: steps.workflow-info.outputs.pullRequestNumber, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['toolchain-available'] + }) # Next, determine the most recent nightly release in this PR's history. - name: Find most recent nightly From 84ef8d65cc2f94483b145b92335940f8c37dc07f Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 12 Dec 2023 22:45:05 +0100 Subject: [PATCH 2/4] Test locally --- .github/workflows/pr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-release.yml b/.github/workflows/pr-release.yml index 1d43a8b3bbd4..0965443db590 100644 --- a/.github/workflows/pr-release.yml +++ b/.github/workflows/pr-release.yml @@ -16,7 +16,7 @@ on: jobs: on-success: runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' && github.repository == 'leanprover/lean4' + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' steps: - name: Set PR number and head commit uses: actions/github-script@v7 From ce58334fde1e6ab5582d89794c8190205f28d7b5 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 12 Dec 2023 22:49:07 +0100 Subject: [PATCH 3/4] Like this? --- .github/workflows/pr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-release.yml b/.github/workflows/pr-release.yml index 0965443db590..99017eb49a6e 100644 --- a/.github/workflows/pr-release.yml +++ b/.github/workflows/pr-release.yml @@ -75,7 +75,7 @@ jobs: with: script: | await github.rest.issues.addLabels({ - issue_number: steps.workflow-info.outputs.pullRequestNumber, + issue_number: ${{ steps.workflow-info.outputs.pullRequestNumber }}, owner: context.repo.owner, repo: context.repo.repo, labels: ['toolchain-available'] From 198b3d3e07fd4a0c5ffcba9653661611ddda7511 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 12 Dec 2023 22:55:12 +0100 Subject: [PATCH 4/4] Revert "Test locally" This reverts commit 84ef8d65cc2f94483b145b92335940f8c37dc07f. --- .github/workflows/pr-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-release.yml b/.github/workflows/pr-release.yml index 99017eb49a6e..cf15d9d6b8e2 100644 --- a/.github/workflows/pr-release.yml +++ b/.github/workflows/pr-release.yml @@ -16,7 +16,7 @@ on: jobs: on-success: runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' && github.repository == 'leanprover/lean4' steps: - name: Set PR number and head commit uses: actions/github-script@v7