typo in README.md #39
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: Lint and fix | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches-ignore: | |
- master | |
jobs: | |
lint: | |
name: lint lockdir | |
runs-on: macos-latest | |
steps: | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- uses: actions/checkout@v1 | |
- name: Install esy | |
run: npm install -g esy | |
- name: Update lockdir | |
run: | | |
esy install | |
git add esy.lock | |
- name: Print esy cache | |
id: print_esy_cache | |
run: node .github/workflows/print_esy_cache.js | |
- name: Try to restore dependencies cache | |
id: deps-cache-macos | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.print_esy_cache.outputs.esy_cache }} | |
key: macOS-latest-4.09-${{ hashFiles('**/index.json') }} | |
- name: Generate opam files | |
run: | | |
esy dune build | |
git add *opam | |
- name: format sources files | |
run: | | |
esy fmt | |
git add "*.ml" "*.mli" | |
- name: Update version in packages | |
run: | | |
node .github/workflows/update_package_version.js | |
git add "*.json" | |
- name: Check that lock directory are up-to-date. | |
run: git diff --exit-code --cached | |
- name: Push if it is not | |
if: failure() | |
run: | | |
git remote set-url --push origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY | |
git config user.name "Github Runner" | |
git config user.email "[email protected]" | |
git commit -am "Update lockdir" | |
git status | |
git push origin HEAD:$GITHUB_REF | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Display status should be clean | |
run: git status | |
if: success() | |
- uses: actions/[email protected] | |
if: failure() | |
with: | |
script: | | |
github.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `I have updated your lock dirs and formatted the code. Please @${context.actor} pull the last commit before pushing any more changes.` | |
}); |