Skip to content

Commit

Permalink
Rework CI for versionning purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tycale committed Dec 31, 2024
1 parent 0749ae3 commit 0d12da0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 39 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/docker-publish.yaml

This file was deleted.

33 changes: 32 additions & 1 deletion .github/workflows/version-bump.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
name: Bump version
name: Version Bump and Docker Publish
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- 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 }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build and Push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/kubebadges:latest
${{ secrets.DOCKER_HUB_USERNAME }}/kubebadges:${{ steps.tag_version.outputs.new_tag }}

0 comments on commit 0d12da0

Please sign in to comment.