Skip to content

request body optional #34

request body optional

request body optional #34

Workflow file for this run

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: 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/oasdiff/github-demo/${{ env.PREV_COMMIT }}/simple.yaml)" >> $GITHUB_ENV
- name: Run diff
run: docker run --rm -t -v $(pwd)/:/data:ro -w /data tufin/oasdiff:origin changelog ${{ env.PREV_FILE }} simple.yaml -f githubactions