image: "gitea.nulo.in/sutty/panel:3.17.3-3.1.4-rails" variables: RAILS_ENV: "production" LC_ALL: "C.UTF-8" HAINISH: "" cache: paths: - "vendor/ruby" - "node_modules" - ".task" assets: stage: "build" before_script: - "git config --global user.email \"${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}\"" - "git config --global user.name \"${GIT_USER_NAME:-$GITLAB_USER_NAME}\"" - "git remote set-url --push origin \"https://${GITLAB_USERNAME}:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git\"" - "apk add brotli go-task diffutils" script: - "go-task assets" after_script: - "git add public && git commit -m \"ci: assets [skip ci]\"" - "git push -o ci.skip" gem-audit: stage: "audit" before_script: - "apk add go-task" - "gem install bundler-audit" script: - "go-task gem-audit" node-audit: stage: "audit" script: - "apk add go-task" - "go-task node-audit" brakeman: stage: "lint" rules: - if: "$CI_PIPELINE_SOURCE == \"merge_request_event\"" before_script: - "apk add go-task" script: - "go-task bundle -- exec brakeman" rubocop: stage: "lint" rules: - if: "$CI_PIPELINE_SOURCE == \"merge_request_event\"" before_script: - "apk add go-task" script: - "./bin/modified_files | grep .rb | xargs go-task bundle -- exec rubocop" haml: stage: "lint" rules: - if: "$CI_PIPELINE_SOURCE == \"merge_request_event\"" before_script: - "apk add go-task" script: - "./bin/modified_files | grep .haml | xargs go-task bundle -- exec haml-lint"