diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba2b0719..2acadeec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,19 +149,21 @@ jobs: ORS = ""; } NR==FNR { - prev_pkgs[$1] = $0; + # Process the previous section + split($0, parts, "- "); + prev_pkgs[parts[1]] = $0; next; } { - pkg_name = $1; - current_line = $0; + # Process the current section + split($0, parts, "- "); + pkg_name = parts[1]; if (pkg_name in prev_pkgs) { old_line = prev_pkgs[pkg_name]; delete prev_pkgs[pkg_name]; - if (old_line != current_line) { + if (old_line != $0) { split(old_line, old_parts, "- "); - split(current_line, new_parts, "- "); - printf "%s: %s -> %s\n", pkg_name, old_parts[1], new_parts[1]; + printf "%s: %s -> %s\n", parts[2], old_parts[1], parts[1]; } } } @@ -183,6 +185,7 @@ jobs: echo -e "$FORMATTED_DIFF" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV + - name: Send Slack Notification # if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }} uses: slackapi/slack-github-action@v1.24.0