generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 12
85 lines (78 loc) · 2.14 KB
/
acm.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: ACM
on:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-*'
paths:
- .github/workflows/acm.yaml
- main.go
- api/**
- pkg/**
- controllers/**
- application-connector.yaml
- application-connector-dependencies.yaml
- go.sum
- go.mod
- Dockerfile
pull_request_target:
types: [opened, synchronize, reopened]
paths:
- .github/workflows/acm.yaml
- main.go
- api/**
- pkg/**
- controllers/**
- application-connector.yaml
- application-connector-dependencies.yaml
- go.sum
- go.mod
- Dockerfile
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout
jobs:
setup:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- id: tag
if: github.event_name == 'push' && github.ref_type == 'tag'
run: echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up go environment
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run unit tests
run: make test | tee test.log
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test.log
path: test.log
build-image:
needs: setup
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: application-connector-manager
dockerfile: Dockerfile
context: .
tags: ${{ needs.setup.outputs.tag }}
summary:
runs-on: ubuntu-latest
needs: [setup, build-image]
steps:
- run: |
echo "# ACM Build" >> $GITHUB_STEP_SUMMARY
echo "## images" >> $GITHUB_STEP_SUMMARY
echo "```json" >> $GITHUB_STEP_SUMMARY
echo "${{ needs.build-image.outputs.images }}" | jq >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY