mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-11 11:59:55 -05:00
* [AI] Migrate remaining workflows to depot action runners Switch all remaining GitHub-hosted runners over to their depot equivalents: - ubuntu-latest -> depot-ubuntu-latest in the VRT-related jobs (e2e-test vrt/merge-vrt, e2e-vrt-comment, vrt-update-generate, vrt-update-apply) - windows-2022/windows-latest -> depot-windows-2022 in the electron build matrices (electron-pr, electron-master, publish-nightly-electron) and publish-microsoft-store Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013dQEH47R5kTkPCvhC2cpoB * [AI] Add release note for depot runner migration Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013dQEH47R5kTkPCvhC2cpoB --------- Co-authored-by: Claude <noreply@anthropic.com>
70 lines
2.6 KiB
YAML
70 lines
2.6 KiB
YAML
name: VRT Comment
|
|
# This workflow posts VRT failure comments on PRs, including fork PRs.
|
|
# It runs with elevated permissions via workflow_run trigger.
|
|
on:
|
|
# workflow_run is needed to get a token that can comment on fork PRs.
|
|
# This job only downloads a metadata artifact and posts a comment;
|
|
# it never checks out or executes PR-supplied code.
|
|
workflow_run: # zizmor: ignore[dangerous-triggers]
|
|
workflows: ['E2E Tests']
|
|
types:
|
|
- completed
|
|
|
|
permissions:
|
|
actions: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
comment:
|
|
name: Post VRT Comment
|
|
runs-on: depot-ubuntu-latest
|
|
if: github.event.workflow_run.event == 'pull_request'
|
|
steps:
|
|
- name: Download VRT metadata
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
name: vrt-comment-metadata
|
|
path: /tmp/vrt-metadata
|
|
continue-on-error: true
|
|
|
|
- name: Extract metadata
|
|
id: metadata
|
|
run: |
|
|
if [ ! -f "/tmp/vrt-metadata/pr-number.txt" ]; then
|
|
echo "No metadata found, skipping..."
|
|
echo "should_comment=false" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
|
|
PR_NUMBER=$(cat "/tmp/vrt-metadata/pr-number.txt")
|
|
VRT_RESULT=$(cat "/tmp/vrt-metadata/vrt-result.txt")
|
|
ARTIFACT_URL=$(cat "/tmp/vrt-metadata/artifact-url.txt")
|
|
|
|
echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
|
|
echo "vrt_result=$VRT_RESULT" >> "$GITHUB_OUTPUT"
|
|
echo "artifact_url=$ARTIFACT_URL" >> "$GITHUB_OUTPUT"
|
|
|
|
if [ "$VRT_RESULT" = "failure" ]; then
|
|
echo "should_comment=true" >> "$GITHUB_OUTPUT"
|
|
echo "VRT tests failed for PR #$PR_NUMBER"
|
|
else
|
|
echo "should_comment=false" >> "$GITHUB_OUTPUT"
|
|
echo "VRT tests passed or skipped for PR #$PR_NUMBER"
|
|
fi
|
|
|
|
- name: Comment on PR with VRT report link
|
|
if: steps.metadata.outputs.should_comment == 'true'
|
|
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
|
|
with:
|
|
number: ${{ steps.metadata.outputs.pr_number }}
|
|
header: vrt-comment
|
|
hide_and_recreate: true
|
|
hide_classify: OUTDATED
|
|
message: |
|
|
<!-- vrt-comment -->
|
|
VRT tests ❌ failed. [View the test report](${{ steps.metadata.outputs.artifact_url }}).
|
|
|
|
To update the VRT screenshots, comment `/update-vrt` on this PR. The VRT update operation takes about 50 minutes.
|