use pull_request event rather than workflow_run

This commit is contained in:
fkwp
2024-04-11 09:30:31 +00:00
parent dcc04bb10f
commit a287d0671b

View File

@@ -28,7 +28,7 @@ jobs:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Netlify
ref: ${{ github.event.workflow_run.head_sha }}
ref: ${{ github.ref || github.head_ref }}
desc: |
Do you trust the author of this PR? Maybe this build will steal your keys or give you malware.
Exercise caution. Use test accounts.
@@ -36,8 +36,8 @@ jobs:
- id: prdetails
uses: matrix-org/pr-details-action@v1.3
with:
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
branch: ${{ github.event.workflow_run.head_branch }}
owner: ${{ github.event.pull_request.head.repo.owner.login }}
branch: ${{ github.event.pull_request.head.ref }}
- name: 📥 Download artifact
uses: actions/download-artifact@v4
@@ -50,7 +50,7 @@ jobs:
run: curl -s https://raw.githubusercontent.com/element-hq/element-call/main/config/netlify_redirects > webapp/_redirects
- name: Add config file
run: curl -s "https://raw.githubusercontent.com/${{ github.event.workflow_run.head_repository.full_name }}/${{ github.event.workflow_run.head_branch }}/config/element_io_preview.json" > webapp/config.json
run: curl -s "https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.pull_request.head.ref }}/config/element_io_preview.json" > webapp/config.json
- name: ☁️ Deploy to Netlify
id: netlify