Bump Versions #25289
This file contains hidden or 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: '0 * * * *' # hourly | |
| workflow_dispatch: | |
| jobs: | |
| bump-versions: | |
| name: Bump Package Versions | |
| runs-on: ubuntu-latest | |
| container: | |
| # pinning because --write-only flag seems broken on newer, need to investigate | |
| image: homebrew/brew@sha256:1e8baee8fa03a31726d50ec5d77635991c3f22d045a3e450e8dcedcb63161bc3 | |
| options: --user root | |
| timeout-minutes: 10 | |
| outputs: | |
| bump-viam: ${{ steps.viam.outputs.bump }} | |
| bump-viam-server: ${{ steps.viam-server.outputs.bump }} | |
| env: | |
| HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} | |
| # these no-update flags are to prevent us from (defeats the purpose of pinning) | |
| HOMEBREW_NO_AUTO_UPDATE: '1' | |
| HOMEBREW_NO_INSTALL_FROM_API: '1' | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GIT_ACCESS_TOKEN }} | |
| - name: Setup homebrew and git config | |
| run: | | |
| ./fake-tap.sh | |
| brew --version | |
| - name: Bump viam-server | |
| id: viam-server | |
| run: | | |
| echo bump=$(./needs-bump.sh viam-server) >> "$GITHUB_OUTPUT" | |
| ./bump-version.sh viam-server | |
| - name: Bump cartographer-module | |
| run: ./bump-version.sh cartographer-module | |
| - name: Bump rplidar-module | |
| run: ./bump-version.sh rplidar-module | |
| - name: Bump orb-slam3-module | |
| run: ./bump-version.sh orb-slam3-module | |
| - name: Bump canon | |
| run: ./bump-version.sh canon | |
| - name: Bump viam-dialdbg | |
| run: ./bump-version.sh viam-dialdbg | |
| - name: Bump viam-cpp-sdk | |
| run: ./bump-version.sh viam-cpp-sdk | |
| - name: Bump viam | |
| id: viam | |
| run: | | |
| echo bump=$(./needs-bump.sh viam) >> "$GITHUB_OUTPUT" | |
| ./bump-version.sh viam | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| commit_message: Auto-update of package versions | |
| bottle-viam: | |
| needs: bump-versions | |
| concurrency: | |
| group: ${{ github.ref }}-bottle | |
| if: needs.bump-versions.outputs.bump-viam == 'true' | |
| uses: ./.github/workflows/bottle.yml | |
| with: | |
| formula: viam | |
| secrets: | |
| GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | |
| bottle-viam-server: | |
| if: needs.bump-versions.outputs.bump-viam-server == 'true' | |
| needs: bump-versions | |
| concurrency: | |
| group: ${{ github.ref }}-bottle | |
| uses: ./.github/workflows/bottle.yml | |
| with: | |
| formula: viam-server | |
| secrets: | |
| GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | |
| upload: | |
| needs: [bottle-viam, bottle-viam-server] | |
| if: | | |
| needs.bottle-viam.result == 'success' || | |
| needs.bottle-viam-server.result == 'success' | |
| uses: ./.github/workflows/upload.yml | |
| secrets: | |
| GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | |
| slack-workflow-status: | |
| if: ${{ failure() }} | |
| name: Post Workflow Status To Slack | |
| needs: upload | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: 'read' | |
| steps: | |
| - name: Slack Workflow Notification | |
| uses: Gamesight/slack-workflow-status@68bf00d0dbdbcb206c278399aa1ef6c14f74347a # v1.3.0 | |
| with: | |
| repo_token: ${{secrets.GITHUB_TOKEN}} | |
| slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} | |
| channel: '#team-devops' | |
| name: 'Workflow Status' |