From 77cd9af74e66bef4b4126fa07fb135944fbcf3e3 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 31 Mar 2024 20:06:54 +0200 Subject: [PATCH] chore: adds housekeeping CI workflows Signed-off-by: Emilien Escalle --- .github/workflows/__greetings.yml | 11 +++++++++++ .github/workflows/__stale.yml | 9 +++++++++ Dockerfile | 5 +++++ Makefile | 2 +- 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/__greetings.yml create mode 100644 .github/workflows/__stale.yml diff --git a/.github/workflows/__greetings.yml b/.github/workflows/__greetings.yml new file mode 100644 index 0000000..8c11507 --- /dev/null +++ b/.github/workflows/__greetings.yml @@ -0,0 +1,11 @@ +name: Greetings + +on: + issues: + types: [opened] + pull_request_target: + branches: [main] + +jobs: + greetings: + uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@0.12.1 \ No newline at end of file diff --git a/.github/workflows/__stale.yml b/.github/workflows/__stale.yml new file mode 100644 index 0000000..9d67193 --- /dev/null +++ b/.github/workflows/__stale.yml @@ -0,0 +1,9 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "30 1 * * *" + +jobs: + main: + uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@0.12.0 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0b056d7..c15ca27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,10 @@ +#checkov:skip=CKV_DOCKER_2: required FROM ghcr.io/super-linter/super-linter:slim-v6 +ARG UID=1000 +ARG GID=1000 +USER ${UID}:${GID} + ENV RUN_LOCAL=true ENV USE_FIND_ALGORITHM=true ENV LOG_LEVEL=WARN diff --git a/Makefile b/Makefile index 7374be4..ceeceea 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ lint: ## Execute linting DEFAULT_WORKSPACE="$(CURDIR)"; \ LINTER_IMAGE="linter:latest"; \ VOLUME="$$DEFAULT_WORKSPACE:$$DEFAULT_WORKSPACE"; \ - docker build --tag $$LINTER_IMAGE .; \ + docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --tag $$LINTER_IMAGE .; \ docker run \ -e DEFAULT_WORKSPACE="$$DEFAULT_WORKSPACE" \ -e FILTER_REGEX_INCLUDE="$(filter-out $@,$(MAKECMDGOALS))" \