forked from cedar-policy/cedar-go
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.29 KB
/
corpus.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
name: Check For Integration Test Corpus Updates
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
# push:
jobs:
build:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Upstream Corpus
run: curl -L -o /tmp/corpus-tests.tar.gz https://raw.githubusercontent.com/cedar-policy/cedar-integration-tests/main/corpus-tests.tar.gz
# cmp returns status code 1 if the files differ
- name: Compare
run: cmp /tmp/corpus-tests.tar.gz corpus-tests.tar.gz
- name: Notify on Failure
if: failure() && github.event_name == 'schedule'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Upstream Integration Test Corpus Modified',
body: 'The upstream integration test corpus at https://raw.githubusercontent.com/cedar-policy/cedar-integration-tests/main/corpus-tests.tar.gz has been updated. Please integrate the changes into the local copy.'
assignees: ['jmccarthy', 'philhassey', 'patjakdev'],
labels: ['bug']
})