-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (37 loc) · 1.23 KB
/
importer-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Run Importer for Markdowns
on:
pull_request:
branches:
- main
env:
GO_VERSION: 1.16.5
jobs:
importer:
name: Run Importer Generate
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
fetch-depth: 0
# NOTE: This is not using the published Importer as we want to ensure the
# new behaviour, but for common use cases, you can set up the below
# step to have Importer ready to be executed for your actions.
# - name: Install Importer
# run: brew install upsidr/tap/importer
# Build Importer
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
- name: Run Go Build
run: go build ./cmd/importer/
# These use locally built Importer, take off `./` for usual use cases
- name: Run Importer against README.md
run: ./importer update README.md
- name: Run Importer against Merge Gatekeeper
run: ./importer update .github/workflows/merge-gatekeeper.yaml
- name: Check if README.md has any change compared to the branch
run: |
git status --short
git diff-index --quiet HEAD