Merge pull request #2306 from element-hq/fkwp-patch-1

netlify PR builds switch to build_reusable
This commit is contained in:
fkwp
2024-04-11 10:16:58 +02:00
committed by GitHub

View File

@@ -1,15 +1,21 @@
name: Netlify PR Preview name: Netlify PR Preview
on: on:
workflow_run: pull_request:
workflows: ["Build"]
types: types:
- completed - synchronize
branches-ignore: - opened
- "main" - labeled
- "livekit"
jobs: jobs:
build_element_call:
uses: ./.github/workflows/build_resuable.yaml
secrets:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
deploy: deploy:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' needs: build_element_call
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
deployments: write deployments: write
@@ -33,13 +39,10 @@ jobs:
owner: ${{ github.event.workflow_run.head_repository.owner.login }} owner: ${{ github.event.workflow_run.head_repository.owner.login }}
branch: ${{ github.event.workflow_run.head_branch }} branch: ${{ github.event.workflow_run.head_branch }}
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
- name: 📥 Download artifact - name: 📥 Download artifact
uses: dawidd6/action-download-artifact@v3 uses: actions/download-artifact@v4
with: with:
run_id: ${{ github.event.workflow_run.id }} name: build-output
name: build
path: webapp path: webapp
- name: Add redirects file - name: Add redirects file