Skip to content

add dl step

add dl step #17

name: Generate manifests for demo
on: [push]
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: v0.1.0
- name: Set up Git
run: |
git config --global user.name 'Bot'
git config --global user.email '[email protected]'
- name: Download mani-diffy binary
uses: actions/github-script@v5
with:
script: |
const { owner, repo } = context.repo
const release = await github.rest.repos.getReleaseByTag({
owner,
repo,
tag: 'v0.1.0'
})
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'])
- 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 ..