|
5 | 5 | workflow_dispatch: |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build-and-push: |
| 8 | + version: |
| 9 | + outputs: |
| 10 | + version: ${{ steps.version.outputs.version }} |
9 | 11 | runs-on: ubuntu-latest |
10 | | - environment: build |
11 | 12 | permissions: |
12 | 13 | contents: read |
13 | | - packages: write |
14 | | - env: |
15 | | - platforms: linux/amd64,linux/arm64 |
16 | 14 | 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 | | - |
41 | 15 | - name: Read Version |
42 | | - id: read_version |
| 16 | + id: version |
43 | 17 | run: | |
44 | 18 | version=$(cat JOB_IMAGE_BASE_VERSION) |
45 | 19 | echo "version=$version" >> $GITHUB_OUTPUT |
46 | 20 |
|
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 |
54 | 35 |
|
55 | 36 | update-base-image-version: |
56 | 37 | runs-on: ubuntu-latest |
|
0 commit comments