From 49724d70bce6f0deb9c440f3738d688c7d0cf247 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:03:06 +0100 Subject: [PATCH] ci: on run `delete-artifacts-of-workflow` on demand There is no need to run it in all PR. --- .github/workflows/delete-artifacts-of-workflow.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/delete-artifacts-of-workflow.yml b/.github/workflows/delete-artifacts-of-workflow.yml index 368e54b..2a9f343 100644 --- a/.github/workflows/delete-artifacts-of-workflow.yml +++ b/.github/workflows/delete-artifacts-of-workflow.yml @@ -1,9 +1,12 @@ name: Delete artifacts of workflow run on: - pull_request: - branches: - - master + workflow_dispatch: + inputs: + pr-number: + description: 'Simulate a PR number, to use in content of the temp artifacts' + required: true + default: '648' jobs: create_artifacts: @@ -11,7 +14,7 @@ jobs: steps: - name: Build fake artifact env: - PR_NUMBER: ${{ github.event.pull_request.number }} + PR_NUMBER: ${{ inputs.pr-number }} run: | mkdir site echo "This is a preview site for PR #${PR_NUMBER}" > site/file1.html