diff --git a/.github/workflows/scripts/sync-deps.sh b/.github/workflows/scripts/sync-deps.sh index f3623a7b0..4b90ed964 100755 --- a/.github/workflows/scripts/sync-deps.sh +++ b/.github/workflows/scripts/sync-deps.sh @@ -33,7 +33,7 @@ update_dep() { echo "Version mismatch for $module (rancher=$new_version, webhook=$old_version) detected" go mod edit -require="$module@$new_version" - echo "Updated $module ($old_version => $new_version)" >> "$CHANGES_FILE" + printf "**%s**\n\n`%s` => `%s`" "$module" "$old_version" "$new_version" >> "$CHANGES_FILE" } rancher_deps=$(cd "$RANCHER_REPO_DIR" && go mod graph) diff --git a/.github/workflows/sync-deps.yaml b/.github/workflows/sync-deps.yaml index 6d9b1ca90..908314aa0 100644 --- a/.github/workflows/sync-deps.yaml +++ b/.github/workflows/sync-deps.yaml @@ -53,8 +53,8 @@ jobs: BRANCH="sync-deps-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" echo "BRANCH=${BRANCH}" >> $GITHUB_ENV git checkout -b "$BRANCH" - ./.github/workflows/scripts/sync-deps.sh ../rancher "changes.txt" - if [ -f changes.txt ]; then + ./.github/workflows/scripts/sync-deps.sh ../rancher "changes.md" + if [ -f changes.md ]; then git add go.mod go.sum git commit -m "Sync dependencies" git push origin "$BRANCH" @@ -62,10 +62,10 @@ jobs: - name: Create PR # Only create the PR if changes were detected - if: ${{ hashFiles('webhook/changes.txt') != '' }} + if: ${{ hashFiles('webhook/changes.md') != '' }} run: | cd webhook - changes=$(cat changes.txt) + changes=$(cat changes.md) body=$(cat <