Skip to content

fix: use numeric UID 65532 instead of nonroot string for Kubernetes r… #2

fix: use numeric UID 65532 instead of nonroot string for Kubernetes r…

fix: use numeric UID 65532 instead of nonroot string for Kubernetes r… #2

name: Build patched controller image
on:
push:
tags:
- 'v*-pf9*'
jobs:
build:
name: Build and push controller image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract tag name
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build and push
id: build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.controller
platforms: linux/amd64
push: true
tags: ghcr.io/platform9/cert-manager-controller:${{ steps.tag.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Output image digest
run: |
echo "## Controller Image Built" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Tag:** \`${{ steps.tag.outputs.tag }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Digest:** \`${{ steps.build.outputs.digest }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Update pf9-flux-src kustomization.yaml with:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`yaml" >> $GITHUB_STEP_SUMMARY
echo "- name: quay.io/jetstack/cert-manager-controller" >> $GITHUB_STEP_SUMMARY
echo " newName: ghcr.io/platform9/cert-manager-controller" >> $GITHUB_STEP_SUMMARY
echo " newTag: ${{ steps.tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
echo " digest: ${{ steps.build.outputs.digest }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY