Skip to content

Add CI for provider images #7

Add CI for provider images

Add CI for provider images #7

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
pull_request:
jobs:
release:
permissions:
contents: write # for release
packages: write # for publishing docker images
name: Release
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Retrieve build information
id: build
run: |
VERSION=v0.0.1-rcX #"${GITHUB_REF#refs/tags/}"
echo "Releasing ${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check out code
uses: actions/checkout@v4
- name: Build bootstrap provider image
run: make BOOTSTRAP_IMG_TAG=${{ env.VERSION }} docker-build-bootstrap
- name: Build controlplane provider image
run: make CONTROLPLANE_IMG_TAG=${{ env.VERSION }} docker-build-controlplane
- name: Publish bootstrap provider image
run: make BOOTSTRAP_IMG_TAG=${{ env.VERSION }} docker-push-bootstrap
- name: Publish controlplane provider image
run: make CONTROLPLANE_IMG_TAG=${{ env.VERSION }} docker-push-controlplane
- name: Build manifests
run: |

Check failure on line 53 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 53, Col: 14): Unexpected symbol: 'VERSION//v'. Located at position 5 within expression: env.VERSION//v
make release
sed -i "s,ghcr.io/canonical/cluster-api-k8s/bootstrap-controller:latest,ghcr.io/canonical/cluster-api-k8s/bootstrap-controller:${{ env.VERSION//v }}," out/bootstrap-components.yaml
sed -i "s,ghcr.io/canonical/cluster-api-k8s/controlplane-controller:latest,ghcr.io/canonical/cluster-api-k8s/controlplane-controller:${{ env.VERSION//v }}," out/control-plane-components.yaml
- name: Create GitHub Release
uses: softprops/[email protected]
with:
name: 'Release ${{ env.VERSION }}'
tag_name: ${{ env.VERSION }}
files: |
out/bootstrap-components.yaml
out/control-plane-components.yaml
out/metadata.yaml
generate_release_notes: true
draft: false
prerelease: ${{ contains(env.VERSION, 'rc') }}