Skip to content

Merge pull request #12 from lephare-photoz/usr/olynn/registry-hash-file #36

Merge pull request #12 from lephare-photoz/usr/olynn/registry-hash-file

Merge pull request #12 from lephare-photoz/usr/olynn/registry-hash-file #36

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 }}