-
Notifications
You must be signed in to change notification settings - Fork 20
29 lines (28 loc) · 957 Bytes
/
ci.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
name: CI
on:
push:
branches-ignore:
- index
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-yaml
- name: Validate registry
uses: Amadevus/pwsh-script@v2
with:
script: |
$ErrorActionPreference = 'Continue'
$entries = @()
if ($github.base_ref) {
# we are in a pull request, let's only check changed entries
$baseRefBranch = 'refs/heads/base'
git fetch --depth=1 origin "+$($github.base_ref):$baseRefBranch" | Out-Host
# get a list of files changed in PR
$entries = git diff-tree --no-commit-id --name-only -r HEAD $baseRefBranch
Write-Host "Changed files:"
$entries | Out-Host
}
./.github/scripts/Validate-Registry.ps1 -Entries $entries -Token $github.token