[DEVX-X] Migrate merge-gatekeeper to native action #1
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: Run Importer for Markdowns | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "**.md" | |
jobs: | |
importer: | |
name: Run Importer Generate for Markdowns | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ">=1.18.0" | |
check-latest: true | |
- name: Install Importer | |
run: go install github.com/upsidr/importer/cmd/[email protected] | |
- name: Run Importer against all *.md files | |
run: find . -name '*.md' -exec importer update {} \; | |
- name: Check if any change compared to the branch HEAD | |
run: | | |
git status --short | |
git diff-index --quiet HEAD |