Update Spack Cache Interface #637
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Spack Cache Interface | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 4 * * *' | |
permissions: | |
contents: write | |
jobs: | |
extraction: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Clone development branch of spack | |
run: git clone https://github.com/spack/spack /opt/spack | |
- name: Run update script | |
run: | | |
export PATH=/opt/spack/bin:$PATH | |
pip install -r requirements.txt | |
# make directories first to ensure they exist to prevent find from failing | |
mkdir -p _cache pages/tags _data | |
find _cache pages/tags _data -mindepth 1 -delete && spack python generate_cache.py | |
- name: Push Results | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git add _cache pages/tags _data | |
git commit -m "Automated push with new spack cache data $(date '+%Y-%m-%d')" || exit 0 | |
git push origin main |