main: status check for changes to versions
and schemas
folder
#5
Workflow file for this run
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: check-restricted-files | |
# Autor: @ralfhandl | |
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/3432 | |
# This workflow checks for changes of restricted files in a pull request | |
# run this on push to any branch and creation or review of pull-requests | |
on: | |
# - push | |
- pull_request | |
# - pull_request_review | |
jobs: | |
check-files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check changed files | |
id: check-changes | |
shell: bash | |
run: | | |
echo github.event_name=${{ github.event_name }} | |
echo github.event.pull_request.base.sha=${{ github.event.pull_request.base.sha }} | |
echo github.event.pull_request.base.ref=${{ github.event.pull_request.base.ref }} | |
echo HEAD=$HEAD | |
echo github.event.pull_request.head.sha=${{ github.event.pull_request.head.sha }} | |
echo github.event.pull_request.head.ref=${{ github.event.pull_request.head.ref }} | |
echo Diff between head and base ref | |
git diff --name-only --exit-code ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} | |
echo Diff between head and base sha | |
git diff --name-only --exit-code ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} | |
env: | |
HEAD: ${{ github.ref_name }} |