try to replace hihi #11
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: Convert Drawio to Image | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
Convert: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download DrawIO | |
run: | | |
sudo snap install drawio | |
sudo apt-get update | |
sudo apt-get install -y xvfb | |
- name: Convert to Image | |
run: | | |
sudo rm -rf Diagram.png | |
xvfb-run drawio -x -f png -o Diagram.png moucnik_diagram.drawio | |
- name: Commit | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
COMMIT_MSG: | | |
Convert Image | |
run: | | |
git config user.email "actions@github" | |
git config user.name "Github Actions" | |
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git add . | |
git pull origin ${GITHUB_REF} | |
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF}) |