Bump Versions #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump Versions | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: '30 17 * * WED' # 12:30 EST on wednesdays | |
workflow_dispatch: | |
jobs: | |
bump-versions: | |
name: Bump Package Versions | |
if: github.repository_owner == 'viamrobotics' | |
runs-on: [self-hosted, x64] | |
container: | |
image: ghcr.io/viamrobotics/rdk-devenv:amd64-cache | |
timeout-minutes: 10 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Update go dependencies | |
id: gobump | |
run: | | |
sudo chown -R testbot . | |
sudo -u testbot bash -lc 'go get -u .' | |
GEN_DIFF=$(git status -s) | |
if [ -n "$GEN_DIFF" ]; then | |
echo "needs_pr=1" >> $GITHUB_OUTPUT | |
fi | |
- name: Add + Commit + Open PR | |
if: steps.gobump.outputs.needs_pr == 1 | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: '[WORKFLOW] Updating go dependencies' | |
branch: 'workflow/update-dependencies' | |
delete-branch: true | |
base: main | |
title: Automated Go Dependencies Update | |
body: This is an auto-generated PR to update go dependencies. Please confirm tests are passing before merging. | |
slack-workflow-status: | |
if: ${{ failure() }} | |
name: Post Workflow Status To Slack | |
needs: | |
- bump-versions | |
runs-on: ubuntu-latest | |
permissions: | |
actions: 'read' | |
steps: | |
- name: Slack Workflow Notification | |
uses: Gamesight/slack-workflow-status@master | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} | |
channel: '#team-slam-github-notifs' | |
name: 'Workflow Status' |