added github action (#135)

This commit is contained in:
André Bauer 2020-02-26 17:54:14 +01:00 committed by GitHub
parent 00153731d1
commit 7fe85067fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 0 deletions

23
.github/lint-scripts.sh vendored Executable file
View 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
View 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