Skip to content

Release v0.3.3 (#137) #33

Release v0.3.3 (#137)

Release v0.3.3 (#137) #33

Workflow file for this run

name: Version-Checker Release
on:
push:
branches:
- "release-v*"
tags:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-version-files:
# Don't push back to a tag!
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
name: Update Version Numbers
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: bhowell2/[email protected]
id: release_number
with:
value: ${{github.ref_name}}
index_of_str: "release-"
- name: Find and Replace Helm Chart Version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: 'v(\d+)\.(\d+)\.(\d+)(-rc(\d)+)?'
replace: "${{steps.release_number.outputs.substring}}"
include: "deploy/charts/version-checker/Chart.yaml"
regex: true
- name: Find and Replace Kubernetes Manifests
uses: jacobtomlinson/gha-find-replace@v3
with:
find: 'v(\d+)\.(\d+)\.(\d+)(-rc(\d)+)?'
replace: "${{steps.release_number.outputs.substring}}"
include: "deploy/yaml/deploy.yaml"
regex: true
- name: Find and Replace Makefile versions
uses: jacobtomlinson/gha-find-replace@v3
with:
find: 'v(\d+)\.(\d+)\.(\d+)(-rc(\d)+)?'
replace: "${{steps.release_number.outputs.substring}}"
include: "Makefile"
regex: true
- name: Detect any Local Changes
uses: dorny/paths-filter@v2
id: filter
with:
base: HEAD
filters: |
versions:
- 'Makefile'
- 'deploy/yaml/deploy.yaml'
- 'deploy/charts/version-checker/Chart.yaml'
- name: Commit files
if: steps.filter.outputs.versions == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git status
git commit -a -m "Bump versions to ${{steps.release_number.outputs.substring}} "
- name: Push changes
if: steps.filter.outputs.versions == 'true'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}
helm-release:
runs-on: ubuntu-latest
steps:
# Checkout our Repo
- uses: actions/checkout@v3
with:
path: version-checker
- name: checkout jetstack-charts
uses: actions/checkout@v3
with:
token: ${{ secrets.JETSTACK_CHARTS_PAT }}
repository: jetstack/jetstack-charts
ref: main
path: jetstack-charts
- uses: azure/setup-helm@v3
with:
token: ${{ github.token }}
- name: package helm chart
run: |
helm package version-checker/deploy/charts/version-checker -d jetstack-charts/charts/
- name: Creating PR
if: startsWith(github.ref, 'refs/tags/')
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.JETSTACK_CHARTS_PAT }}
title: "Release version-checker ${{github.ref_name }}"
commit-message: "Release version-checker ${{github.ref_name }}"
branch: version-checker/${{github.ref_name}}
path: jetstack-charts
add-paths: charts/*.tgz
delete-branch: true
signoff: true
base: main
draft: ${{ !startsWith(github.ref, 'refs/tags/') }}
docker-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: ${{ matrix.platform }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Build and push (if applicable)
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ startsWith(github.ref, 'refs/tags/') }}
pull: true
tags: quay.io/jetstack/version-checker:${{github.ref_name}}
cache-from: type=gha
cache-to: type=gha,mode=max
github-release:
name: Create/Update GitHub Release
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Release / Change Logs
uses: softprops/action-gh-release@v1
with:
draft: ${{ !startsWith(github.ref, 'refs/tags/') }}
prerelease: ${{ contains('-rc', github.ref_name) || !startsWith(github.ref, 'refs/tags/') }}
generate_release_notes: true