switch to build_reusable

This commit is contained in:
fkwp
2024-04-11 07:42:56 +00:00
parent f32934d7e4
commit 9c00d74924

View File

@@ -1,13 +1,20 @@
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:
if: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') && github.event.pull_request.head.repo.full_name == github.repository }}
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' if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -33,13 +40,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