Back to using reference on pipeline

This commit is contained in:
DevTekVE
2024-07-18 09:08:52 +02:00
parent faf52492b6
commit cbb30cd8c5
+4 -4
View File
@@ -231,13 +231,13 @@ publish to public github prebuilt:
needs: ["build"]
variables:
DISCORD_HOOK: "${DISCORD_MANUAL_BUILD_WEBHOOK_URL}" # Default hook if not overriden by children
before_script: &notify_discord_before_script
before_script:
- 'apk add curl jq envsubst'
script:
- echo using [${TEMPLATE}]
- cat release/ci/${TEMPLATE} | envsubst | tee payload.json
- 'curl -X POST -H "Content-Type: application/json" -d "$(cat payload.json)" ${DISCORD_HOOK} | jq .'
rules: &notify_discord_rules
rules:
- if: $NEW_BRANCH
when: on_success
- when: never
@@ -248,7 +248,7 @@ notify pending action:
variables:
TEMPLATE: "discord_template_notify_dev_private.json"
before_script:
- *notify_discord_before_script
- !reference [".notify_discord", "before_script"]
- export AVATAR_URL=$(curl -s -X GET "https://gitlab.com/api/v4/avatar?email=${GITLAB_USER_EMAIL}" | jq -r '.avatar_url')
notify new dev build:
@@ -261,4 +261,4 @@ notify new dev build:
- if: $NEW_BRANCH == "dev-c3"
variables:
DISCORD_HOOK: "${DISCORD_NEW_BUILD_WEBHOOK_URL}" # Overriding hook because we know we are dev-c3
- *notify_discord_rules
- !reference [".notify_discord", "rules"]