-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.14 KB
/
ci.yaml
File metadata and controls
51 lines (42 loc) · 1.14 KB
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
name: CI
on:
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: read
jobs:
commitlint:
name: Lint commit messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
hadolint:
name: Lint Containerfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Containerfile
build:
name: Test build
runs-on: ubuntu-latest
needs: [hadolint]
steps:
- uses: actions/checkout@v4
- name: Install yq
run: |
sudo curl -sSL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/v4.45.4/yq_linux_amd64"
sudo chmod +x /usr/local/bin/yq
- name: Build image
run: |
BUILD_ARGS=""
for arg in $(yq e '.build.args[]' manifest.yaml); do
BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"
done
# shellcheck disable=SC2086
docker build -f Containerfile ${BUILD_ARGS} -t test-build .