Update ap-or-voc-config.json #34
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 diff between template and current state | |
on: [push] | |
jobs: | |
generate-diff: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: | |
- 18.x | |
steps: | |
- name: Checkout source branch | |
uses: actions/checkout@v4 | |
with: | |
repository: Informatievlaanderen/OSLOthema-template | |
ref: standaardenregister | |
path: source | |
- name: Clone other repository | |
uses: actions/checkout@v4 | |
with: | |
# Dynamic reference to the active repository so that it works immediately when creating a new thema repo | |
repository: ${{ github.repository }} | |
ref: standaardenregister | |
path: | |
target | |
# Extra step to debug the file structure | |
- name: List file structure of source dir | |
shell: bash | |
run: | | |
ls source | |
- name: List file structure of target dir | |
shell: bash | |
run: | | |
ls target | |
- name: See which files are unchanged between template and repository | |
shell: bash | |
# add a rule to ignore .git folder | |
run: | | |
identical_files="" | |
for file in $(find source -type f | grep -v ".git"); do | |
target_file=${file/source/target} | |
if [ -f "$target_file" ]; then | |
diff_output=$(diff -b "$file" "$target_file" | cat -t || true) | |
if ! [[ $diff_output == *"differ"* ]]; then | |
identical_files+="$file\n" | |
fi | |
fi | |
done | |
echo "Identical files:" | |
echo -e "$identical_files" |