mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-09 19:31:30 +01:00
Because OF COURSE ubuntu has a version of tree from 2023 that doesn't support the '-' to remove the first path element.
52 lines
2.0 KiB
YAML
52 lines
2.0 KiB
YAML
# Triggers after the shared component tests have finished,
|
|
# It uploads the received images and diffs to netlify, printing the URLs to the console
|
|
name: Upload Shared Component Visual Test Diffs
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Shared Component Visual Tests"]
|
|
types:
|
|
- completed
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
|
|
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
report:
|
|
if: github.event.workflow_run.conclusion == 'failure'
|
|
name: Upload Diffs
|
|
runs-on: ubuntu-24.04
|
|
environment: Netlify
|
|
permissions:
|
|
actions: read
|
|
deployments: write
|
|
steps:
|
|
- name: Install tree
|
|
run: "sudo apt-get install -y tree"
|
|
|
|
- name: Download Diffs
|
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
name: received-images
|
|
path: received-images
|
|
|
|
- name: Generate Index
|
|
run: "cd received-images && tree -L 1 --noreport -H '' -o index.html ."
|
|
|
|
- name: 📤 Deploy to Netlify
|
|
uses: matrix-org/netlify-pr-preview@9805cd123fc9a7e421e35340a05e1ebc5dee46b5 # v3
|
|
with:
|
|
path: received-images
|
|
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
|
|
branch: ${{ github.event.workflow_run.head_branch }}
|
|
revision: ${{ github.event.workflow_run.head_sha }}
|
|
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
site_id: ${{ vars.NETLIFY_SITE_ID }}
|
|
desc: Shared Component Visual Diffs
|
|
deployment_env: SharedComponentDiffs
|
|
prefix: "diffs-"
|