Compare commits

...

11 Commits

Author SHA1 Message Date
04f84bc4ed Fix end file
Fix end file

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 15:08:31 +02:00
cc5961492e Fix wrong file name
Fix wrong file name

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 01:12:43 +02:00
55eb3b7c96 Fix bash error in shellcheck
Fix bash error in shellcheck

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 01:09:09 +02:00
50b57169e7 Revert "Remove bash in env"
This reverts commit 8ce154f1b2.
2021-08-03 01:08:52 +02:00
8ce154f1b2 Remove bash in env
Remove bash in env

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 01:07:09 +02:00
d02099ad95 Change to bash in shellcheck and rename dockcross script to dockcross.sh
Change to bash in shellcheck and rename dockcross script to dockcross.sh

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 01:03:00 +02:00
92efe118b3 Revert "Reduce shellcheck to error only (Will be changed later)"
This reverts commit 84e12b0f66.
2021-08-03 00:52:33 +02:00
84e12b0f66 Reduce shellcheck to error only (Will be changed later)
Reduce shellcheck to error only (Will be changed later)

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 00:51:25 +02:00
882a67b9d2 Add shellcheck
Add shellcheck CI and shellcheck in Makefile (bash-check rule)

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-08-03 00:47:26 +02:00
c1526555a5 Merge pull request #532 from bensuperpc/Update_CI
Update CI
2021-08-02 16:43:56 -04:00
cd5979a3c9 Update CI
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2021-07-23 23:52:07 +02:00
6 changed files with 44 additions and 5 deletions

View File

@ -6,7 +6,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v3 - uses: actions/stale@v4
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-milestones: 'future,alpha,beta,release' exempt-issue-milestones: 'future,alpha,beta,release'

View File

@ -42,7 +42,7 @@ jobs:
image: image:
name: ${{ matrix.arch_name }} name: ${{ matrix.arch_name }}
needs: base needs: base
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

28
.github/workflows/shellcheck.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Shellcheck CI
on:
push:
branches:
- '*'
paths-ignore:
- '**/README.md'
pull_request:
branches:
- '*'
paths-ignore:
- '**/README.md'
workflow_dispatch:
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: error
format: gcc
env:
SHELLCHECK_OPTS: -s bash

View File

@ -50,6 +50,12 @@ endif
# Tag images with date and Git short hash in addition to revision # Tag images with date and Git short hash in addition to revision
TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD) TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD)
# shellcheck executable
SHELLCHECK := shellcheck
# Defines the level of verification (error, warning, info...)
SHELLCHECK_SEVERITY_LEVEL := error
# #
# images: This target builds all IMAGES (because it is the first one, it is built by default) # images: This target builds all IMAGES (because it is the first one, it is built by default)
# #
@ -275,6 +281,11 @@ purge: clean
# Remove all images with organization (ex dockcross/*) # Remove all images with organization (ex dockcross/*)
$(DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f $(DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
# Check bash syntax
bash-check:
find . -type f \( -name "*.sh" -o -name "*.bash" \) -print0 | xargs -0 -P"$(shell nproc)" -I{} \
$(SHELLCHECK) --check-sourced --color=auto --format=gcc --severity=error --shell=bash --enable=all "{}"
# #
# testing implicit rule # testing implicit rule
# #

View File

@ -13,4 +13,4 @@ RUN \
rm -rf /buildscripts rm -rf /buildscripts
# Runtime scripts # Runtime scripts
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/ COPY imagefiles/entrypoint.sh imagefiles/dockcross.sh /dockcross/

View File

@ -6,11 +6,11 @@ DEFAULT_DOCKCROSS_IMAGE=dockcross/base # DO NOT MOVE THIS LINE (see entrypoint.
# Helpers # Helpers
# #
err() { err() {
echo -e >&2 ERROR: $@\\n echo -e >&2 "ERROR: $*\n"
} }
die() { die() {
err $@ err "$*"
exit 1 exit 1
} }