Fix hashes in test #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate manifests for demo | |
on: [push] | |
env: | |
USE_RELEASE: true | |
RELEASE_TAG: v0.1.1 | |
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 .. |