-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (47 loc) · 1.32 KB
/
main.yml
File metadata and controls
57 lines (47 loc) · 1.32 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
52
53
54
55
56
57
name: CI
on: [push, pull_request]
jobs:
shellcheck:
name: shellcheck
runs-on: [ubuntu-latest]
steps:
- name: Clone Repo
uses: actions/checkout@v2
- name: Run Shellcheck
uses: ludeeus/[email protected]
test:
name: Test
runs-on: [ubuntu-latest]
strategy:
matrix:
# inspired by github.com/sdolenc/bash-matrix/
container:
- debian:buster-slim # deb10 bash5.0
- debian:stretch-slim # deb09 bash4.4
- debian/eol:jessie # deb08 bash4.3
# - bash:4.2
#todo: 'bash:4.1',
#tbd: 'bash:4.0', 'bash:3.2', 'bash:3.1', 'bash:3.0'
container: ${{ matrix.container }}
steps:
- name: Clone Repo
uses: actions/checkout@v2
- name: Run Unit Tests
run: |
bash --version | head -2
scripts/test.sh
shell: bash
publish:
name: Publish
runs-on: [ubuntu-latest]
needs: [shellcheck, test]
if: github.ref == 'refs/heads/master'
steps:
- name: Clone Repo
uses: actions/checkout@v2
- name: Publishing Docker image
uses: elgohr/[email protected]
with:
name: checksum/critic.sh
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}