-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (48 loc) · 1.61 KB
/
_build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: build
on:
workflow_call:
inputs:
tag:
description: 'Additional tag for built images'
required: false
type: string
default: ""
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout
jobs:
compute-tags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.get_tag.outputs.TAGS }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- if: ${{ !startsWith(github.event_name, 'pull_request') }}
name: Get the latest tag
id: get_tag
run: |
{
echo 'TAGS<<EOF'
echo "${{ github.sha }}"
echo "${{ github.ref_name}}"
echo "${{ inputs.tag }}"
echo EOF
} >> "$GITHUB_OUTPUT"
build-warden-admission:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: warden/admission
dockerfile: docker/admission/Dockerfile
tags: ${{ needs.compute-tags.outputs.tags }}
build-warden-operator:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: warden/operator
dockerfile: docker/operator/Dockerfile
tags: ${{ needs.compute-tags.outputs.tags }}