-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (47 loc) · 1.88 KB
/
create-palettes.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
47
48
49
50
51
52
53
54
55
56
57
name: Generate component palettes
on: [push, pull_request]
jobs:
run_tests:
name: Generate component palettes
runs-on: ubuntu-20.04
env:
PROJECT_NAME: daliuge
GIT_REPO: https://github.com/ICRAR/daliuge
GITHUB_USERNAME: eagle.updater
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
- name: Install system dependencies
run: |
sudo apt-get update && sudo apt-get install -y doxygen xsltproc
pip install BlockDAG
pip install dlg_paletteGen
- name: Configure git
run: |
git config --global user.name $GITHUB_USERNAME
git config --global user.email [email protected]
- name: Environment variables
run: |
OUTPUT_FILENAME=$PROJECT_NAME-${GITHUB_REF_NAME/\//_}
echo "PROJECT_VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> $GITHUB_ENV
- name: Create palettes
run: |
dlg_paletteGen -r -t daliuge ./ $OUTPUT_FILENAME.palette
dlg_paletteGen -r -t template ./ $OUTPUT_FILENAME-template.palette
- name: Commit palettes to EAGLE
env:
EAGLE_UPDATER_TOKEN: ${{ secrets.EAGLE_UPDATER_TOKEN }}
PALETTE_TOKEN: ${{ secrets.PALETTE_TOKEN }}
run: |
git clone https://[email protected]/ICRAR/EAGLE-graph-repo
mkdir -p EAGLE-graph-repo/$PROJECT_NAME
mv $OUTPUT_FILENAME.palette EAGLE-graph-repo/$PROJECT_NAME/
mv $OUTPUT_FILENAME-template.palette EAGLE-graph-repo/$PROJECT_NAME/
cd EAGLE-graph-repo
git add *
git diff-index --quiet HEAD || git commit -m "Automatically generated DALiuGE palette (branch $GITHUB_REF_NAME, commit $PROJECT_VERSION)"
git push