Skip to content

Merge pull request #37 from Seasawher/Seasawher-patch-1 #9

Merge pull request #37 from Seasawher/Seasawher-patch-1

Merge pull request #37 from Seasawher/Seasawher-patch-1 #9

Workflow file for this run

name: Make Exercise
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'yuma-mizuno'
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install elan
run: |
set -o pipefail
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: make exercise
run: lake exe mk_exercise Solution Tutorial
- name: diff
id: diff
run: |
git add -N Tutorial
git diff --name-only --exit-code
continue-on-error: true
- name: commit
if: steps.diff.outcome == 'failure'
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add Tutorial
git commit -m "generated by GitHub Action"
git push