1.1.1 #7
Workflow file for this run
This file contains hidden or 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: 🚀 Release | |
permissions: read-all | |
on: | |
release: | |
types: | |
- created | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: inditextech/k8s-overcommit-operator | |
jobs: | |
release: | |
name: 🏷️ Release | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
values_version: ${{ steps.version.outputs.values_version }} | |
chart_version: ${{ steps.version.outputs.chart_version }} | |
catalog_version: ${{ steps.version.outputs.catalog_version }} | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Check bundle generation 🧪 | |
run: | | |
make bundle | |
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code | |
- name: 📝 Load Operator version | |
id: version | |
run: | | |
echo "version=$(make print-VERSION | cut -d'=' -f2)" >> $GITHUB_OUTPUT | |
echo "values_version=$(yq '.deployment.image.tag' chart/values.yaml)" >> $GITHUB_OUTPUT | |
echo "chart_version=$(yq '.appVersion' chart/Chart.yaml)" >> $GITHUB_OUTPUT | |
echo "catalog_version=$(yq '.spec.image' deploy/catalog_source.yaml | cut -d':' -f2)" >> $GITHUB_OUTPUT | |
echo $GITHUB_OUTPUT | |
check: | |
name: 🔎 Check versions | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🔎 Check versions | |
run: | | |
echo "version: ${{ needs.release.outputs.version }}" | |
echo "values_version: ${{ needs.release.outputs.values_version }}" | |
echo "chart_version: ${{ needs.release.outputs.chart_version }}" | |
echo "tag_name: ${{ github.event.release.tag_name }}" | |
echo "catalog_version: ${{ needs.release.outputs.catalog_version }}" | |
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.version }}" ]; then | |
echo "Version in Makefile does not match release tag" | |
exit 1 | |
fi | |
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.values_version }}" ]; then | |
echo "Version in chart/values.yaml does not match release tag" | |
exit 1 | |
fi | |
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.chart_version }}" ]; then | |
echo "Version in chart/Chart.yaml does not match release tag" | |
exit 1 | |
fi | |
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.catalog_version }}" ]; then | |
echo "Version in deploy/catalog_source.yaml does not match release tag" | |
exit 1 | |
fi | |
build: | |
name: 🛠️ Build Operator images | |
needs: check | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: 🔐 Login into ${{ env.REGISTRY }} | |
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: 🏗️ Build and push Operator image | |
run: | | |
make docker-build docker-push | |
- name: 🏗️ Build and push Operator bundle | |
run: | | |
make bundle | |
make bundle-build bundle-push | |
- name: 🏗️ Build and push Operator catalog | |
run: | | |
make catalog-build catalog-push |