Update issue templates #27
Workflow file for this run
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 | |
steps: | |
- name: Checkout repository | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
id: setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
id: install-deps | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install memote==0.16.1 | |
- name: Run memote on deployment branch | |
id: memote-diff | |
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.xml" | |
memote report diff --filename "diff${GITHUB_SHA}.html" "$model" "prev_model.xml" | |
git checkout $deployment | |
git pull | |
git add "diff${GITHUB_SHA}.html" | |
git config --global user.email [email protected] | |
git config --global user.name z-haiman | |
git commit -m 'test: add diff report' | |
git push | |
- name: Post PR comment | |
id: "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 }} |