-
Notifications
You must be signed in to change notification settings - Fork 18
54 lines (49 loc) · 1.79 KB
/
efabless_tapeout.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: efabless_tapeout
on:
workflow_dispatch:
jobs:
efabless_tapeout:
env:
EFABLESS_REPO: ${{ vars.EFABLESS_REPO }}
GIT_SSH_COMMAND: 'ssh -i ~/.id_ed25519 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no'
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v3
id: download_artifact
with:
workflow: gds.yaml
workflow_conclusion: success
name: efabless_submission
path: tinytapeout_submission
- name: Checkout repo
run: |
git config --global user.email "[email protected]"
git config --global user.name "Tiny Tapeout Bot"
touch ~/.id_ed25519
chmod 600 ~/.id_ed25519
echo "$EFABLESS_REPO_SSH_KEY" > ~/.id_ed25519
git clone "$EFABLESS_REPO" tt_efabless
env:
# To generate a new key: ssh-keygen -o -t ed25519 -C "[email protected]"
EFABLESS_REPO_SSH_KEY: ${{ secrets.EFABLESS_REPO_SSH_KEY }}
- name: Copy files
working-directory: tt_efabless
run: |
rm -rf gds lef lvs verilog README.md shuttle_index.json
cp -r ../tinytapeout_submission/* .
- name: Commit and push
working-directory: tt_efabless
shell: bash
run: |
COMMIT_BODY="\
run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ fromJSON(steps.download_artifact.outputs.artifacts)[0].workflow_run.id }}
commit: ${{ fromJSON(steps.download_artifact.outputs.artifacts)[0].workflow_run.head_sha }}
"
git add -A
if ! git diff-index --quiet HEAD; then
git commit -m "update shuttle" -m "$COMMIT_BODY"
fi
echo ""
git log -1
git push