PR to test failure in added pictures #62
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: 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: | |
- name: "curl1" | |
continue-on-error: true | |
id: diff_files | |
run: | | |
changed_files=$(curl https://patch-diff.githubusercontent.com/raw/htw-imi-showtime/showtime-website/pull/350.diff 2> /dev/null | grep -e "diff --git" | sed -e "s#diff --git a/##g") | |
echo $changed_files | |
echo changed_files=$changed_files >> $GITHUB_OUTPUT | |
- name: "curl2" | |
continue-on-error: true | |
run: | | |
curl ${{ github.event.pull_request.diff_url }} | |
- name: "curl2" | |
continue-on-error: true | |
id: diff_files_2 | |
run: | | |
changed_files=$(curl ${{ github.event.pull_request.diff_url }} | 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 |