Skip to content

Commit

Permalink
add workflow to bump version (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-foxtrot authored Jan 21, 2024
1 parent aee5871 commit 38f75cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Test build
name: Run CI

on:
push:
branches: [main, unstable]
tags: ['v*']
pull_request:
workflow_dispatch:
schedule:
- cron: '39 13 * * *' # run daily

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bump version
on:
pull_request:
types:
- closed
branches:
- main
jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Bump version and push tag
id: tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch

- name: Run CI on ${{ steps.tag.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run build.yml --ref ${{ steps.tag.outputs.new_tag }}
- name: Build and Publish Containers for ${{ steps.tag.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run build_containers.yml --ref ${{ steps.tag.outputs.new_tag }}

0 comments on commit 38f75cd

Please sign in to comment.