echo #11
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: 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 | |
- name: Get prev commit | |
run: echo "PREV_COMMIT=$(git --no-pager log -n1 | grep commit | cut -d' ' -f2)" >> $GITHUB_ENV | |
- run: echo PREV_COMMIT=${{ env.PREV_COMMIT }} | |
- name: Get prev file | |
run: echo "PREV_FILE=$(echo https://raw.githubusercontent.com/reuvenharrison/oas/${{ env.PREV_COMMIT }}/simple.yaml)" >> $GITHUB_ENV | |
- run: echo PREV_FILE=${{ env.PREV_FILE }} | |
- name: Run diff | |
run: docker run --rm -t -v $(pwd)/:/data:ro tufin/oasdiff changelog ${{ env.PREV_FILE }} /data/simple.yaml -f githubactions | |