generated from mathieu-benoit/asm-workshop
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 1.11 KB
/
ci-simple.yml
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
name: ci-simple
permissions:
contents: read
on:
pull_request:
jobs:
container:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: prepare environment variables
run: |
shortSha=`echo ${GITHUB_SHA} | cut -c1-7`
echo "IMAGE_NAME=acm-workshop:$shortSha" >> $GITHUB_ENV
- name: build container
run: |
cd app
docker build --tag ${IMAGE_NAME} .
- name: dockle
run: |
docker run -v /var/run/docker.sock:/var/run/docker.sock --rm goodwithtech/dockle:latest -ak KEY_SHA512 --exit-code 1 --exit-level fatal ${IMAGE_NAME}
- name: run container locally as a test
run: |
docker run -d -p 8080:8080 --read-only --cap-drop=ALL --user=1000 ${IMAGE_NAME}
chart:
needs: container
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: helm lint
run: |
helm lint chart/ --strict
helm template chart/ > helm-output.yaml
kustomize create --resources helm-output.yaml
kustomize build .