2929 uses : dawidd6/action-download-artifact@v6
3030 with :
3131 run_id : ${{inputs.current_run_id}}
32+ name : sample-artifacts-meta
3233 path : current
3334
3435 - name : Get artifacts from base
@@ -37,41 +38,54 @@ jobs:
3738 with :
3839 commit : ${{inputs.base_commit_sha}}
3940 workflow : on-commit.yml
41+ workflow_conclusion : success
42+ name : sample-artifacts-meta
43+ search_artifacts : true
44+ check_artifacts : true
4045 path : old
4146
4247 - name : Get artifacts from base
4348 if : ${{inputs.base_commit_sha}} == ""
4449 uses : dawidd6/action-download-artifact@v6
4550 with :
4651 workflow : on-commit.yml
52+ workflow_conclusion : success
53+ name : sample-artifacts-meta
54+ search_artifacts : true
55+ check_artifacts : true
4756 path : old
4857
4958 - name : Generate .config diff
5059 shell : bash {0}
5160 id : config_diff
5261 run : |
53- cd current
54- configs=$(find . -name .config)
55- cd ..
62+ configs=$(find current -name .config)
5663 echo "\`\`\`" >> config_diff.md
5764 for cfg in ${configs}
5865 do
59- echo "compare ${cfg}"
66+ rel_cfg="${cfg#current/}"
67+ old_cfg="old/${rel_cfg}"
68+ if [ ! -f "${old_cfg}" ]; then
69+ echo "Skipping ${rel_cfg} - no baseline .config"
70+ continue
71+ fi
6072
61- grep -v "CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION" old/${cfg} > tmp_old.1
73+ echo "compare ${rel_cfg}"
74+
75+ grep -v "CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION" "${old_cfg}" > tmp_old.1
6276 grep -v "#" tmp_old.1 > tmp_old.2
6377 sort tmp_old.2 > tmp_old.3
64- tr -s '\n' < tmp_old.3 > old/${cfg}
78+ tr -s '\n' < tmp_old.3 > tmp_old.4
6579
66- grep -v "CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION" current/ ${cfg} > tmp_current.1
80+ grep -v "CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION" " ${cfg}" > tmp_current.1
6781 grep -v "#" tmp_current.1 > tmp_current.2
6882 sort tmp_current.2 > tmp_current.3
69- tr -s '\n' < tmp_current.3 > current/${cfg}
83+ tr -s '\n' < tmp_current.3 > tmp_current.4
7084
7185 rm -rf tmp_*
7286
73- printf "\n%s\n%-62s| %s\n" "${cfg }" "old" "new" > cfg_diff.md
74- diff --text --report-identical-files --suppress-common-lines --side-by-side --label old --label new old/${cfg} current/${cfg} >> cfg_diff.md
87+ printf "\n%s\n%-62s| %s\n" "${rel_cfg }" "old" "new" > cfg_diff.md
88+ diff --text --report-identical-files --suppress-common-lines --side-by-side --label old --label new tmp_old.4 tmp_current.4 >> cfg_diff.md
7589 if [ $? -eq 1 ]; then cat cfg_diff.md >> config_diff.md; fi
7690 done
7791 echo "\`\`\`" >> config_diff.md
0 commit comments