From 8d399623e6e9553023ab145d738653a25973c636 Mon Sep 17 00:00:00 2001 From: Paolo Smiraglia Date: Wed, 28 Apr 2021 11:46:02 +0200 Subject: [PATCH 1/3] Substitute GITHUB_TOKEN with PAT --- .github/workflows/release_drafter.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml index 5920508..3b01343 100644 --- a/.github/workflows/release_drafter.yml +++ b/.github/workflows/release_drafter.yml @@ -7,11 +7,28 @@ on: types: [opened, reopened, synchronize] jobs: + check_secrets: + name: Check secrets + runs-on: ubuntu-latest + outputs: + PAT: ${{ steps.pat.outputs.is_set }} + ALL: ${{ steps.pat.outputs.is_set }} + steps: + - + name: Check PAT + id: pat + run: | + echo "is_set: ${{ secrets.PAT != '' }}" + echo "::set-output name=is_set::${{ secrets.PAT != '' }}" update_release_draft: name: Update draft release runs-on: ubuntu-latest + needs: + - check_secrets steps: - + if: ${{ needs.check_secrets.outputs.PAT == 'true' }} + name: Draft next release uses: release-drafter/release-drafter@v5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} From 023327f682fbcecbd4df924bc064c1478b847af5 Mon Sep 17 00:00:00 2001 From: Paolo Smiraglia Date: Wed, 28 Apr 2021 11:49:50 +0200 Subject: [PATCH 2/3] Setup sandbox --- .github/workflows/docker.yml | 1 + .github/workflows/release_drafter.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 126bc00..a6c5809 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - test-wf tags: - 'v*' diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml index 3b01343..899a6a1 100644 --- a/.github/workflows/release_drafter.yml +++ b/.github/workflows/release_drafter.yml @@ -2,7 +2,7 @@ name: Release drafter on: push: - branches: [main] + branches: [main, test-wf] pull_request: types: [opened, reopened, synchronize] From 33a1d1c11bf0e35045769d9a20e14e7519f52d74 Mon Sep 17 00:00:00 2001 From: Paolo Smiraglia Date: Wed, 28 Apr 2021 11:59:21 +0200 Subject: [PATCH 3/3] Revert "Setup sandbox" This reverts commit 023327f682fbcecbd4df924bc064c1478b847af5. --- .github/workflows/docker.yml | 1 - .github/workflows/release_drafter.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a6c5809..126bc00 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - test-wf tags: - 'v*' diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml index 899a6a1..3b01343 100644 --- a/.github/workflows/release_drafter.yml +++ b/.github/workflows/release_drafter.yml @@ -2,7 +2,7 @@ name: Release drafter on: push: - branches: [main, test-wf] + branches: [main] pull_request: types: [opened, reopened, synchronize]