Skip to content

Commit

Permalink
Merge pull request #78 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Improve GitHub Actions workflows
  • Loading branch information
andyone authored Sep 11, 2021
2 parents e56a5bd + e0caa51 commit ca080ff
Showing 1 changed file with 10 additions and 34 deletions.
44 changes: 10 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,53 +83,29 @@ jobs:

needs: Go

env:
SHELLCHECK_VERSION: 0.7.2

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Shellcheck
run: |
wget https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz
tar xf shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz
mv shellcheck-v${SHELLCHECK_VERSION} shellcheck-latest
- name: Print Shellcheck version info
run: ./shellcheck-latest/shellcheck --version

- name: Check scripts
run: |
bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-docker'
bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-entrypoint'
bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-massive'
bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck bibop-multi-check'
- name: Check scripts with Shellcheck
uses: essentialkaos/shellcheck-action@v1
with:
files: bibop-docker bibop-entrypoint bibop-massive bibop-multi-check

Hadolint:
name: Hadolint
runs-on: ubuntu-latest

needs: Go

env:
HADOLINT_VERSION: 2.6.1

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Hadolint
run: |
wget -O hadolint https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64
chmod +x hadolint
- name: Print Hadolint version info
run: ./hadolint --version

- name: Check Docker files
run: |
./hadolint centos7.docker
- name: Check dockerfiles with Hadolint
uses: essentialkaos/hadolint-action@v1
with:
files: centos7.docker

DockerBuild:
name: Docker Build Check
Expand All @@ -147,6 +123,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build CentOS 7 image
- name: Build Docker image
run: |
docker build -f centos7.docker -t centos7 .
docker build -f centos7.docker -t bibop .

0 comments on commit ca080ff

Please sign in to comment.