malware-filter/.gitlab-ci.yml

44 lines
971 B
YAML
Raw Normal View History

image: alpine:latest
2020-10-08 03:32:47 +00:00
build_job:
2022-01-08 09:35:30 +00:00
stage: build
2020-10-08 03:32:47 +00:00
before_script:
- apk update && apk add brotli curl
script:
- sh src/script.sh
artifacts:
paths:
- tmp
- public
pages:
2022-01-08 09:35:30 +00:00
stage: deploy
2020-10-08 03:32:47 +00:00
script:
- find . -name "oisd*.txt" -type f -print0 | xargs -0 gzip -f -k -9
- find . -name "oisd*.txt" -type f -print0 | xargs -0 brotli -f -k -9
2020-10-08 03:32:47 +00:00
artifacts:
paths:
- public
2020-10-08 03:32:47 +00:00
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
2022-01-09 02:11:41 +00:00
deploy_job:
stage: deploy
before_script:
- apk update && apk add curl
script:
2022-01-08 23:27:10 +00:00
- curl -X POST -d "{}" "https://api.netlify.com/build_hooks/$NETLIFY_BUILD_HOOK"
- curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/$CLOUDFLARE_BUILD_HOOK"
rules:
# Only trigger through schedule job and "Run pipeline" in the main branch
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'