From 8315488b99556f475fa3516f778f7f094ca1996e Mon Sep 17 00:00:00 2001 From: Zack Pollard <zackpollard@ymail.com> Date: Wed, 29 May 2024 18:59:06 +0100 Subject: [PATCH] ci: use extracted PR number for messaging PRs from forks & remove approval (#9865) * ci: use extracted PR number for messaging PRs from forks * ci: remove required approval to deploy docs for PRs from forks --- .github/workflows/docs-deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 0d46c907f7..ed1f36bc82 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -52,14 +52,14 @@ jobs: repo: context.repo.repo, pull_number }); - const isApproved = pr.labels.some((l) => l.name == "preview-docs"); - console.log({pull_number, isApproved}); + console.log({pull_number}); parameters = { event: "pr", name: `pr-${pull_number}`, - shouldDeploy: !isFork || isApproved + pr_number: pull_number, + shouldDeploy: true }; } else if (eventType == "release") { parameters = { @@ -161,7 +161,7 @@ jobs: uses: actions-cool/maintain-one-comment@v3 if: ${{ steps.parameters.outputs.event == 'pr' }} with: - number: ${{ github.event.workflow_run.pull_requests[0].number }} + number: ${{ fromJson(needs.checks.outputs.parameters).pr_number }} body: | 📖 Documentation deployed to [${{ steps.parameters.outputs.name }}.preview.immich.app](https://${{ steps.parameters.outputs.name }}.preview.immich.app) emojis: 'rocket'