mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
* fix: set persist-credentials explicitly for checkout https://woodruffw.github.io/zizmor/audits/#artipacked * fix: minimize permissions scope for workflows https://woodruffw.github.io/zizmor/audits/#excessive-permissions * fix: remove potential template injections https://woodruffw.github.io/zizmor/audits/#template-injection * fix: only pass needed secrets in workflow_call https://woodruffw.github.io/zizmor/audits/#secrets-inherit * fix: push perm for single-arch build jobs I hadn't realised these push to the registry too :x * chore: fix formatting * fix: $ * fix: retag job quoting --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: Preview label
|
|
|
|
on:
|
|
pull_request:
|
|
types: [labeled, closed]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
comment-status:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'preview' }}
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
|
|
with:
|
|
message-id: 'preview-status'
|
|
message: 'Deploying preview environment to https://pr-${{ github.event.pull_request.number }}.preview.internal.immich.cloud/'
|
|
|
|
remove-label:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'preview') }}
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
|
|
with:
|
|
script: |
|
|
github.rest.issues.removeLabel({
|
|
issue_number: context.payload.pull_request.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
name: 'preview'
|
|
})
|