Removing essentiality part from experiments.yml #33
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: memote-diff | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
diff: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade memote | |
- name: Run memote on deployment branch | |
run: | | |
model=$(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /model/) print $2}' memote.ini | tr -d ' ') | |
deployment=$(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /deployment/) print $2}' memote.ini | tr -d ' ') | |
git show "origin/main:${model}" > "prev_${model}" | |
memote report diff --filename "diff${GITHUB_SHA}.html" "$model" "prev_${model}" | |
git checkout $deployment | |
git pull | |
git add "diff${GITHUB_SHA}.html" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git config --global user.name "${GITHUB_ACTOR}" | |
git commit -m 'test: add diff report' | |
git push | |
- name: Post PR comment | |
uses: JoseThen/[email protected] | |
with: | |
comment: Memote diff was generated at https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/diff${{ github.sha }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |