Skip to content

Release zbchaos

Release zbchaos #19

Workflow file for this run

name: Release zbchaos
on:
workflow_dispatch:
inputs:
release:
description: 'Release and tag name'
required: true
default: 'zbchaos-v1.X.0'
env:
GO_VERSION: 1.19
jobs:
go-release:
name: Zbchaos go release
runs-on: ubuntu-latest
defaults:
run:
working-directory: go-chaos
permissions:
contents: 'write'
id-token: 'write'
env:
GH_TOKEN: ${{ github.token }}
# GITHUB_TOKEN: ${{ secrets.GHA_RELEASE }} We use the built-in token
RELEASE_VERSION: ${{ github.event.inputs.release }}
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "${{ env.GO_VERSION }}"
- name: Setup BuildKit
uses: docker/setup-buildx-action@v2
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
workload_identity_provider: 'projects/628707732411/locations/global/workloadIdentityPools/zeebe-chaos-pool/providers/zeebe-chaos-provider'
service_account: 'zeebe-chaos@zeebe-io.iam.gserviceaccount.com'
- id: 'get-credentials'
name: 'Get GKE credentials'
uses: 'google-github-actions/get-gke-credentials@v1'
with:
cluster_name: 'zeebe-cluster'
location: 'europe-west1-b'
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: "Run release script"
# We defined everything as a script such that we can also run it manually/locally
# Release contains building the artifacts, creating GitHub release, and publishing docker image
run: ./release.sh "${{ github.event.inputs.release }}"