Skip to content

feat: [TKC-2726] cron jobs config model (#305) #47

feat: [TKC-2726] cron jobs config model (#305)

feat: [TKC-2726] cron jobs config model (#305) #47

name: GoReleaser tag build
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
ALPINE_IMAGE: alpine:3.18.3
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Go
uses: actions/setup-go@v4
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
with:
destination_container_repo: ${{ github.repository }}
provider: dockerhub
short_description: 'Testkube Kubernetes Operator'
readme_file: './README.md'
- name: Release
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release -f goreleaser/.goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: false
- name: Editing helm-release repo with version based on a Tag pushed.
run: |
# Setting up Git:
git clone https://kubeshop-bot:$GH_TOKEN@github.com/kubeshop/helm-charts
cd ./helm-charts
git config user.name "kubeshop-bot"
git config user.email "kubeshop-bot@kubeshop.io"
export GH_TOKEN
export RELEASE_VERSION
export SERVICE
git fetch origin main
git checkout main
cd ./scripts
./chart_releaser.sh --helm-chart-folder testkube-$SERVICE
env:
SERVICE: operator
GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
RELEASE_VERSION: ${{ steps.tag.outputs.tag }}