mirror of
https://github.com/immich-app/immich.git
synced 2025-01-27 22:22:45 +01:00
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
This commit is contained in:
parent
61051ba479
commit
8315488b99
1 changed files with 4 additions and 4 deletions
8
.github/workflows/docs-deploy.yml
vendored
8
.github/workflows/docs-deploy.yml
vendored
|
@ -52,14 +52,14 @@ jobs:
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
pull_number
|
pull_number
|
||||||
});
|
});
|
||||||
const isApproved = pr.labels.some((l) => l.name == "preview-docs");
|
|
||||||
|
|
||||||
console.log({pull_number, isApproved});
|
console.log({pull_number});
|
||||||
|
|
||||||
parameters = {
|
parameters = {
|
||||||
event: "pr",
|
event: "pr",
|
||||||
name: `pr-${pull_number}`,
|
name: `pr-${pull_number}`,
|
||||||
shouldDeploy: !isFork || isApproved
|
pr_number: pull_number,
|
||||||
|
shouldDeploy: true
|
||||||
};
|
};
|
||||||
} else if (eventType == "release") {
|
} else if (eventType == "release") {
|
||||||
parameters = {
|
parameters = {
|
||||||
|
@ -161,7 +161,7 @@ jobs:
|
||||||
uses: actions-cool/maintain-one-comment@v3
|
uses: actions-cool/maintain-one-comment@v3
|
||||||
if: ${{ steps.parameters.outputs.event == 'pr' }}
|
if: ${{ steps.parameters.outputs.event == 'pr' }}
|
||||||
with:
|
with:
|
||||||
number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
number: ${{ fromJson(needs.checks.outputs.parameters).pr_number }}
|
||||||
body: |
|
body: |
|
||||||
📖 Documentation deployed to [${{ steps.parameters.outputs.name }}.preview.immich.app](https://${{ steps.parameters.outputs.name }}.preview.immich.app)
|
📖 Documentation deployed to [${{ steps.parameters.outputs.name }}.preview.immich.app](https://${{ steps.parameters.outputs.name }}.preview.immich.app)
|
||||||
emojis: 'rocket'
|
emojis: 'rocket'
|
||||||
|
|
Loading…
Reference in a new issue