Commit 26825e2c authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

ci: only create badges if the user wants them

parent 781147ae
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
---
# This job will create or update any badges set through other jobs
# It requires a Project Access Token set as a CI/CD variable called GL_TOKEN
# Also make sure you have set a protected tags wildcard as "v*"

# It requires:
# - A Project Access Token set as a CI/CD variable called GL_TOKEN
# - Protected tags set with a wildcard: "v*"
# - A variable called I_WANT_BADGES set to a truthy value

# To create your own automatic badges, add the following global variables to a job:
# variables:
#   BADGE_job_name: "label-message-color"  # See https://shields.io/
@@ -42,4 +46,4 @@ badge:
        esac
      done
  rules:
    - if: ($CI_COMMIT_TAG =~ /^v[0-9]+(\.[0-9]+){2}$/ && $GL_TOKEN)
    - if: ($CI_COMMIT_TAG =~ /^v[0-9]+(\.[0-9]+){2}$/ && $GL_TOKEN && $I_WANT_BADGES)