add dispatch to release ci (#307) #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.CI_BOT_TOKEN }} | |
repository: kubeshop/helm-charts | |
event-type: release-testkube-operator-charts | |
client-payload: '{"RELEASE_VERSION": "${{ steps.tag.outputs.tag }}", "SERVICE": "operator"}' |