-
Notifications
You must be signed in to change notification settings - Fork 35
60 lines (60 loc) · 1.84 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
53
54
55
56
57
58
59
60
---
name: ci
on:
pull_request:
push:
branches:
- "release/*"
jobs:
yamllint:
name: yamllint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: yaml-lint
uses: ibiqlik/action-yamllint@v1
with:
config_file: .yamllint.yml
strict: true
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: shellcheck
uses: fkautz/[email protected]
image-check:
name: Check that image is pullable
runs-on: ubuntu-latest
if: ${{ contains(github.head_ref, 'update/') }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check images
uses: nick-invision/retry@v2
with:
timeout_minutes: 1
max_attempts: 3
retry_on: timeout
command: |
repoName=${GITHUB_REF#refs/heads/update/networkservicemesh/}
images=$(grep -roh 'apps' -e "ghcr.io/networkservicemesh/ci/${repoName}.*")
for image in $images; do
docker pull $image
done
diff-correctness-check:
name: diff-correctness-check
runs-on: ubuntu-latest
if: ${{ github.actor == 'nsmbot' }}
steps:
- name: Check out the code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Only allow yaml files
run: |
BRANCH_POINT=$(git merge-base ${{github.event.pull_request.base.sha}} HEAD)
echo "branch point: $BRANCH_POINT"
find . -type f -not -path "./.github/*" ! -name '*.yaml' ! -name '*.yml' -exec git diff "${{ github.event.pull_request.head.sha }}".."$BRANCH_POINT" --exit-code -- {} +