-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (29 loc) · 1.02 KB
/
update-ui.yaml
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
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