generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 12
50 lines (44 loc) · 1.22 KB
/
pull-build-image.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
name: Pull Build Image
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
paths-ignore:
- ".github/**"
- ".reuse/**"
- "LICENSES/**"
- "config/**"
- "data/**"
- "docs/**"
- "scripts/**"
- "tests/**"
- "**/*.md"
- "doc_indexer/**"
- CODEOWNERS
- LICENSE
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout
jobs:
build:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: kyma-companion
dockerfile: Dockerfile
context: .
export-tags: true
test-image:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get install jq
- name: Extract image name from JSON
id: extract-image
run: |
echo "IMAGE_NAME=$(echo '${{ needs.build.outputs.images }}' | jq -r '.[0]')" >> $GITHUB_ENV
- name: Test image
run: ./scripts/shell/run-and-check-container.sh "$IMAGE_NAME" PR-${{ github.event.number }}-container