Skip to content

PR to test failure in added pictures #65

PR to test failure in added pictures

PR to test failure in added pictures #65

name: Own Files Only
# this workflow checks whether a pull request changes only files in the project folder"
# PR Titles have to start with the Project ID! (e.g. B1: ....)
on:
pull_request:
workflow_dispatch:
jobs:
check-own-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 1
- name: "curl"
continue-on-error: true
id: diff_files
run: |
curl ${{ github.event.pull_request.diff_url }}
echo "$diff_file"
echo "----------------------"
changed_files=$(echo $diff_file | grep -e "diff --git" | sed -e "s#diff --git a/##g")
echo $changed_files
echo changed_files=$changed_files >> $GITHUB_OUTPUT
- name: extract project id
continue-on-error: true
id: extract_pid
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
project_id=$(bin/extract_pid_from_pr_title.sh $PR_TITLE)
pid_ok=$?
echo "project_id=$project_id" >> $GITHUB_OUTPUT
exit $pid_ok
- name: "get changed files from diff extract"
continue-on-error: true
id: diffs
run: |
changed_files=${{ steps.diff_files.outputs.changed_files }} | tr ' ' ':'
echo "###$changed_files###"
bin/files_changed_from_diff.sh ${{ steps.extract_pid.outputs.project_id }} $changed_files
- name: "validation"
continue-on-error: true
run: |
OK="${{ steps.diffs.outputs.files_ok }}"
bin/validate.sh $OK
- name: "report error"
run: |
OK="${{ steps.diffs.outputs.files_ok }}"
NOK="${{ steps.diffs.outputs.files_not_ok }}"
bin/report.sh $OK $NOK