-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 loc) · 1.57 KB
/
gitdiff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Verify follow-up actions required
permissions:
pull-requests: write
on:
# workflow_dispatch:
pull_request:
branches: [ main ]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 #fails without this
- id: git_diff
name: Compare to previous version
shell: pwsh
run: |
$GitDiff = & ./tools/Get-Diff.ps1
$GitDiff.ChangedFiles >> $Env:GITHUB_STEP_SUMMARY
# Write all folders we required in follow-up actions
$AssetsChanged = $GitDiff.Assets.ToString().ToLower()
Write-Host "AssetsChanged=$AssetsChanged"
Write-Output "AssetsChanged=$AssetsChanged" >> $Env:GITHUB_OUTPUT
# Consider this
# - name: Verify if images in next-gen format are present
# if: ${{ fromJSON(steps.git_diff.outputs.AssetsChanged) }}
# shell: pwsh
# run: |
# ./tools/Convert-WebImage.ps1 -ToolVersion libwebp-1.3.2-linux-x86-64 | Out-Null
# # $GitStatus = git status --short
# # $GitStatus
- if: ${{ fromJSON(steps.git_diff.outputs.AssetsChanged) }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: assets
recreate: true
message: |
Detected assets folder change for ${{ github.sha }}
# Consider this...
# seo_job:
# needs: [ build_and_deploy_job ]
# if: needs.build_and_deploy_job.outputs.docs_changed && github.event_name != 'pull_request'
# uses: ./.github/workflows/seo.yml