diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 415ecb1..2321dec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml new file mode 100644 index 0000000..23e8726 --- /dev/null +++ b/.github/workflows/version_bump.yml @@ -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/github-tag-action@1.64.0 + 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 }}