-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 935 Bytes
/
bc.yml
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
name: go
on:
pull_request:
push:
permissions:
contents: read
jobs:
oasdiff:
strategy:
fail-fast: true
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2 # fetch two commits so we can get the prev commit
- name: Test
run: echo "::warning file=simple.yaml,line=2,col=5,endColumn=7::Missing semicolon"
- name: Get prev commit
run: echo "PREV_COMMIT=$(git --no-pager log --skip=1 --max-count=1 | grep commit | cut -d' ' -f2)" >> $GITHUB_ENV
- name: Get prev file
run: echo "PREV_FILE=$(echo https://raw.githubusercontent.com/reuvenharrison/oas/${{ env.PREV_COMMIT }}/simple.yaml)" >> $GITHUB_ENV
- name: Run diff
run: docker run --rm -t -v $(pwd)/:/data:ro -w /data tufin/oasdiff changelog ${{ env.PREV_FILE }} ./simple.yaml -f githubactions