Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashwat-K committed Jun 14, 2024
1 parent 9a47187 commit 25a9db5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/update_go_modules.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Update Go Modules

on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
workflow_dispatch: # Allows manual triggering of the workflow
Expand Down Expand Up @@ -95,8 +98,14 @@ jobs:
if [ "${{ env.GO_VERSION_UPDATED }}" == "true" ]; then
echo "Go version updated from ${{ env.CURRENT_GO_VERSION }} to ${{ env.LATEST_GO_VERSION }}" >> pr_body.md
fi
pr_body=$(cat pr_body.md | jq -sRr @uri)
echo "::set-output name=pr_body::$pr_body"
- name: Read PR body
id: read_pr_body
run: |
PR_BODY=$(cat pr_body.md)
echo "PR_BODY<<EOF" >> $GITHUB_ENV
echo "$PR_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Pull Request
if: env.exit_code == '1'
Expand All @@ -107,5 +116,5 @@ jobs:
branch: ${{ env.BRANCH_NAME }}
base: main
title: Update Go modules and Go version
body: ${{ steps.generate_pr_body.outputs.pr_body }}
body: ${{ env.PR_BODY }}
labels: go-modules, automated-update

0 comments on commit 25a9db5

Please sign in to comment.