-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (50 loc) · 1.59 KB
/
generate-manifests-demos.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
55
56
57
name: Generate manifests for demo
on: [push]
env:
USE_RELEASE: true
RELEASE_TAG: v0.1.0
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.name 'Bot'
git config --global user.email '[email protected]'
- name: Download mani-diffy binary
if: env.USE_RELEASE == 'true'
uses: actions/github-script@v5
with:
script: |
const { owner, repo } = context.repo
const release = await github.rest.repos.getReleaseByTag({
owner,
repo,
tag: core.getInput('release_tag')
})
const asset = release.data.assets.find(asset => asset.name === 'mani-diffy')
const downloadUrl = asset.browser_download_url
await exec.exec('wget', ['-O', 'mani-diffy', downloadUrl])
await exec.exec('chmod', ['+x', 'mani-diffy'])
release_tag: ${{ env.RELEASE_TAG }}
- name: Compile
if: env.USE_RELEASE == 'false'
run: |
make build-binaries
- name: Run for demo
run: |
cd demo
rm -rf .zz.auto-generated
../mani-diffy -hash-store=json
- name: Commit and push changes to /demo
run: |
if git diff --quiet; then
echo "No changes to commit"
else
git add .
git commit -m "Some manifests have changed in the demo."
git push
fi
cd ..