-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.53 KB
/
update-registry.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
name: Update registry file
on:
workflow_dispatch:
push:
env:
REGISTRY_FILE: data_registry.txt
jobs:
get-files-job:
name: (Re)calculate file hashes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # Check out the repository
- name: Import packages
run: |
pip install pooch
- name: Remove current registry file
run :
rm -f "$REGISTRY_FILE"
- name: Add files to registry
run: |
python scripts/add_to_registry.py alloutputkeys.txt "$REGISTRY_FILE"
for data_dir in examples/ ext/ filt/ opa/ sed/ test_fit/ tools/ vega/; do
python scripts/add_to_registry.py "$data_dir" "$REGISTRY_FILE"
done
- name: Cat new registry file
run :
cat "$REGISTRY_FILE"
# TODO: should we check for/delete unmerged PRs at this point?
- name: Set output variables
id: vars
run: |
pr_title="[Auto] Update registry file $(date +%d-%m-%Y)"
pr_body="This PR was auto-generated on $(date +%d-%m-%Y) \
by [create-pull-request](https://github.com/peter-evans/create-pull-request)."
echo "pr_title=$pr_title" >> $GITHUB_OUTPUT
echo "pr_body=$pr_body" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update registry
branch: update-registry
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}