added github action (#135)
This commit is contained in:
parent
00153731d1
commit
7fe85067fa
23
.github/lint-scripts.sh
vendored
Executable file
23
.github/lint-scripts.sh
vendored
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# lint bash scripts
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
|
||||
CONFIG_DIR=".github"
|
||||
HOOKS_DIR="hooks"
|
||||
CONTAINER_DIR="containers"
|
||||
|
||||
TMP_FILE="$(mktemp)"
|
||||
|
||||
find "${CONFIG_DIR}" -type f -name "*.sh" > "${TMP_FILE}"
|
||||
find "${HOOKS_DIR}" -type f -name "*.sh" >> "${TMP_FILE}"
|
||||
find "${CONTAINER_DIR}" -type f -name "*.sh" >> "${TMP_FILE}"
|
||||
|
||||
while read -r FILE; do
|
||||
echo lint "${FILE}"
|
||||
shellcheck -x "${FILE}"
|
||||
done < "${TMP_FILE}"
|
||||
|
||||
rm "${TMP_FILE}"
|
27
.github/workflows/ci.yaml
vendored
Normal file
27
.github/workflows/ci.yaml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint-bash-scripts:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Lint Bash scripts
|
||||
uses: docker://koalaman/shellcheck-alpine:v0.7.0
|
||||
with:
|
||||
args: .github/lint-scripts.sh
|
||||
|
||||
install-docker-compose:
|
||||
name: install-docker-compose
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-bash-scripts
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: get containers
|
||||
run: docker-compose pull
|
||||
- name: install
|
||||
run: docker-compose up
|
Loading…
Reference in New Issue
Block a user