Bump gardener/cc-utils from b158a357b8e947b3e4fc3495aad0a9307ed6d3d7 to 9dc83024923245f56cbe366344c5ae25c10423a9 #73
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: build | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| # Checkout repository | |
| contents: read | |
| # Push container images | |
| packages: write | |
| # This is required for requesting the JWT | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| IMAGE_NAME: ghcr.io/gardenlinux/glvd-postgres | |
| IMAGE_TAG: latest | |
| # Change this if you fork the repo | |
| IMAGE_NAME_ORG: gardenlinux | |
| # Change this if you fork the repo | |
| OIDC_AUDIENCE: glvd | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| - name: Install qemu dependency for multi-arch build | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user-static | |
| - name: Build Image | |
| id: build_image | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| image: ${{ env.IMAGE_NAME }} | |
| tags: ${{ env.IMAGE_TAG }} | |
| platforms: linux/amd64, linux/arm64 | |
| containerfiles: | | |
| ./Containerfile | |
| - name: Echo Outputs | |
| run: | | |
| echo "Image: ${{ steps.build_image.outputs.image }}" | |
| echo "Tags: ${{ steps.build_image.outputs.tags }}" | |
| echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}" | |
| - name: Check images created | |
| run: buildah images | grep '${{ env.IMAGE_NAME }}' | |
| - name: Check manifest | |
| run: | | |
| set -x | |
| buildah manifest inspect ${{ steps.build_image.outputs.image }}:${{ env.IMAGE_TAG }} | |
| - name: Push To ghcr.io | |
| id: push-to-ghcr | |
| if: ${{ github.event_name != 'pull_request' }} | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: ${{ steps.build_image.outputs.image }} | |
| tags: ${{ steps.build_image.outputs.tags }} | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Print image url | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}" | |
| - name: Authenticate to cluster | |
| id: kube_auth | |
| uses: gardener/cc-utils/.github/actions/kubernetes-auth@9dc83024923245f56cbe366344c5ae25c10423a9 | |
| with: | |
| server: https://api.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com | |
| server-ca-discovery-url: https://discovery.ingress.garden.canary.k8s.ondemand.com/projects/gardnlinux/shoots/8a569063-b0d3-45c4-a653-158e70b1bfd1/cluster-ca | |
| audience: ${{ env.OIDC_AUDIENCE }} | |
| - name: Deploy the image | |
| if: ${{ github.event_name != 'pull_request' }} | |
| env: | |
| KUBECONFIG: kubeconfig.yaml | |
| run: kubectl --namespace default set image sts/glvd-database glvd-postgres=ghcr.io/gardenlinux/glvd-postgres@${{ steps.push-to-ghcr.outputs.digest }} |