Skip to content

Generate diagram into an assets branch #14

Generate diagram into an assets branch

Generate diagram into an assets branch #14

Workflow file for this run

---
name: Lint
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: npm install
run: npm install
- name: Run the linter
run: ./lint
- name: Create the diagram
run: ./diagram > diagram.md
- name: Save the diagram
run: |
git add diagram.md
git status
git remote -v
new_branch="${{ github.ref_name }}-diagram"
git branch -D "${new_branch}" || :
git checkout -b "${new_branch}"
git config user.name "${{ github.workflow }}"
git config user.email "github-actions@example.com"
git commit -m "Diagram saved by lint.yml workflow"
git push --set-upstream "$( git remote )" "${new_branch}"