High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat: remove preview label on pr close (#16249)
bo0tzzca9e02379d35
diff --git a/.github/workflows/preview-comment.yaml b/.github/workflows/preview-comment.yamldeleted file mode 100644index f49c271fe5..0000000000--- a/.github/workflows/preview-comment.yaml+++ /dev/null@@ -1,17 +0,0 @@-name: Preview comment--on:- pull_request:- types: [labeled]--jobs:- comment-status:- runs-on: ubuntu-latest- if: ${{ github.event.label.name == 'preview' }}- permissions:- pull-requests: write- steps:- - uses: mshick/add-pr-comment@v2- with:- message-id: "preview-status"- message: "Deploying preview environment to https://pr-${{ github.event.pull_request.number }}.preview.internal.immich.cloud/"diff --git a/.github/workflows/preview-label.yaml b/.github/workflows/preview-label.yamlnew file mode 100644index 0000000000..6468d05e80--- /dev/null+++ b/.github/workflows/preview-label.yaml@@ -0,0 +1,33 @@+name: Preview label++on:+ pull_request:+ types: [labeled]++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@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@v7+ with:+ script: |+ github.rest.issues.removeLabel({+ issue_number: context.payload.pull_request.number,+ owner: context.repo.owner,+ repo: context.repo.repo,+ name: 'preview'+ })