Skip to content

chore(main): release 2.12.0 (#1145) #111

chore(main): release 2.12.0 (#1145)

chore(main): release 2.12.0 (#1145) #111

Workflow file for this run

---
# Create konvoy-image-builder release when a tag is created.
# - Creates github release
# - Signs mac-os binary and reuploads artifacts to the github release
# - Bumps KIB version in mesosphere/cluster-api-provider-preprovisioned repository
on:
workflow_dispatch:
push:
tags:
- 'v*'
name: Release konvoy-image-builder
jobs:
release-to-github:
runs-on:
- self-hosted
- small
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Download GoReleaser
run: go install github.com/goreleaser/goreleaser@v1.15.2
- name: Docker Login
uses: docker/login-action@v3
with:
registry: docker.io
username: mesosphereci
password: ${{ secrets.DOCKER_PASS }}
- name: Setup buildkit
uses: docker/setup-buildx-action@v3
- name: Release
run: make release
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
bump-kib:
runs-on: ubuntu-22.04
needs: release-to-github
steps:
- name: Checkout mesosphere/cluster-api-provider-preprovisioned repository
uses: actions/checkout@v4
with:
repository: mesosphere/cluster-api-provider-preprovisioned
token: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
path: cluster-api-provider-preprovisioned
fetch-depth: 0
- name: Track default github workspace as safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Get KIB Version
run: |
PREV_VERSION=$(make --silent get-kib-version)
echo "prev_version=$PREV_VERSION" >> "$GITHUB_ENV"
working-directory: cluster-api-provider-preprovisioned
- name: Update Konvoy-image-builder version in mesosphere/cluster-api-provider-preprovisioned repository
run: make update-kib
working-directory: cluster-api-provider-preprovisioned
env:
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
path: kib
- name: Get bump pr type
working-directory: kib
run: |
make install-semver
export SEMVER_CLI_BIN=.local/semver-cli/semver
PR_TYPE=$(hack/version-diff.sh --version-latest ${{ github.ref_name }} --version-previous ${{ env.prev_version }})
echo "pr_type=$PR_TYPE" >> "$GITHUB_ENV"
- name: Create Pull Request for KIB bump in CAPPP
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
add-paths: preprovisioned/kib
body: bumps KIB to latest version
commit-message: "${{ env.pr_type }}: bump kib to ${{ github.ref_name }}"
path: cluster-api-provider-preprovisioned
title: "${{ env.pr_type }}: bump kib to ${{ github.ref_name }}"