Skip to content

Commit

Permalink
Update format of changes for PR description
Browse files Browse the repository at this point in the history
  • Loading branch information
tomleb committed Dec 13, 2024
1 parent b855fac commit ef92a8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/sync-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ 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"
fi
- 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 <<EOF
# Sync with Rancher
Expand Down

0 comments on commit ef92a8b

Please sign in to comment.