-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (51 loc) · 1.86 KB
/
ci.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: ci
permissions:
contents: read
on:
pull_request:
branches: [main]
jobs:
containers:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: docker build podinfo
run: |
docker image build -t podinfo:latest templates/podinfo-example/content/
- name: docker build node-service
run: |
docker image build -t node-service:latest templates/node-service/content/
- name: docker build backstage
run: |
mkdir credentials && touch credentials/github-app-backstage-humanitec-credentials.yaml
docker image build -t backstage:latest .
validate-score:
runs-on: ubuntu-latest
env:
HUMCTL_VERSION: '0.23.1'
steps:
- name: checkout code
uses: actions/checkout@v4
- uses: humanitec/setup-cli-action@v1
with:
version: ${{ env.HUMCTL_VERSION }}
- name: humctl score validate - backstage
run: |
humctl score validate --local --strict \
score.yaml
- name: humctl score validate - node-service
run: |
score_file=templates/node-service/content/score.yaml
# Replace template string with actual values, sadly no better way yet
# https://github.com/backstage/backstage/issues/13668
sed -i -e 's/${{ '${{ values.name | dump }}' }}/test-workload/g' "$score_file"
humctl score validate --local --strict \
"$score_file"
- name: humctl score validate - podinfo
run: |
score_file=templates/podinfo-example/content/score.yaml
# Replace template string with actual values
sed -i -e 's/${{ '${{ values.name | dump }}' }}/test-workload/g' "$score_file"
humctl score validate --local --strict \
"$score_file"