Skip to content

Commit cd77589

Browse files
committed
fix (and refactor) base-image-build
- switch back to Google-Artifact-Registry - use reusable workflow for building OCI-Images
1 parent 78c4d06 commit cd77589

File tree

1 file changed

+18
-37
lines changed

1 file changed

+18
-37
lines changed

.github/workflows/cc-job-image-base.yaml

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,33 @@ on:
55
workflow_dispatch:
66

77
jobs:
8-
build-and-push:
8+
version:
9+
outputs:
10+
version: ${{ steps.version.outputs.version }}
911
runs-on: ubuntu-latest
10-
environment: build
1112
permissions:
1213
contents: read
13-
packages: write
14-
env:
15-
platforms: linux/amd64,linux/arm64
1614
steps:
17-
- uses: gardener/cc-utils/.github/actions/trusted-checkout@master
18-
id: checkout
19-
with:
20-
auth-app-client-id: ${{ vars.GARDENER_GITHUB_ACTIONS_APP_ID }}
21-
auth-app-private-key: ${{ secrets.GARDENER_GITHUB_ACTIONS_PRIVATE_KEY }}
22-
23-
- name: Setup Git Identity
24-
uses: gardener/cc-utils/.github/actions/setup-git-identity@master
25-
26-
- name: Setup Docker-Buildx
27-
uses: docker/setup-buildx-action@v3
28-
29-
- name: Setup QEMU
30-
uses: docker/setup-qemu-action@v3
31-
with:
32-
platforms: ${{ env.platforms }}
33-
34-
- name: docker-auth
35-
uses: docker/login-action@v3
36-
with:
37-
username: ${{ github.actor }}
38-
password: ${{ steps.checkout.outputs.token }}
39-
registry: ghcr.io
40-
4115
- name: Read Version
42-
id: read_version
16+
id: version
4317
run: |
4418
version=$(cat JOB_IMAGE_BASE_VERSION)
4519
echo "version=$version" >> $GITHUB_OUTPUT
4620
47-
- name: Build and Push Base Image
48-
uses: docker/build-push-action@v6
49-
with:
50-
push: true
51-
platforms: linux/amd64,linux/arm64
52-
tags: ghcr.io/${{ github.repository_owner }}/cc-utils/job-image-base:${{ steps.read_version.outputs.version }}
53-
file: Dockerfile.job-image-base
21+
build-and-push:
22+
needs:
23+
- version
24+
permissions:
25+
contents: read
26+
packages: write
27+
id-token: write
28+
with:
29+
name: job-image-base
30+
oci-registry: europe-docker.pkg.dev/gardener-project/releases
31+
oci-repository: cicd/job-image-base
32+
oci-platforms: 'linux/amd64,linux/arm64'
33+
version: ${{ needs.version.outputs.version }}
34+
dockerfile: Dockerfile.job-image-base
5435

5536
update-base-image-version:
5637
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)