Skip to content

Commit

Permalink
ci: Add version bumping and Docker tag release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tycale committed Dec 31, 2024
1 parent 9dbd821 commit e9e9c62
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build and Push Docker Image
on:
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
pull_request:

jobs:
Expand Down Expand Up @@ -33,4 +34,6 @@ jobs:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/kubebadges:latest
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/kubebadges:latest
${{ secrets.DOCKER_HUB_USERNAME }}/kubebadges:${{ github.ref_name }}
21 changes: 21 additions & 0 deletions .github/workflows/version-bump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Bump version
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

0 comments on commit e9e9c62

Please sign in to comment.