Unverified Commit 6c2a7cb3 authored by Johnatas's avatar Johnatas Committed by GitHub

[v1.27] System agent push tags fix (#8569)

* change script and drone Signed-off-by: 's avatarJohnatas <johnatasr@hotmail.com> * adjust secret Signed-off-by: 's avatarJohnatas <johnatasr@hotmail.com> --------- Signed-off-by: 's avatarJohnatas <johnatasr@hotmail.com>
parent c928fb06
...@@ -673,12 +673,15 @@ steps: ...@@ -673,12 +673,15 @@ steps:
- name: dispatch - name: dispatch
image: curlimages/curl:7.74.0 image: curlimages/curl:7.74.0
secrets: [ pat_username, github_token, release_token_k3s ]
user: root user: root
environment: environment:
PAT_USERNAME: PAT_USERNAME:
from_secret: pat_username from_secret: pat_username
PAT_TOKEN: PAT_TOKEN:
from_secret: github_token from_secret: github_token
K3S_RELEASE_TOKEN:
from_secret: release_token_k3s
commands: commands:
- apk -U --no-cache add bash - apk -U --no-cache add bash
- scripts/dispatch - scripts/dispatch
......
...@@ -13,7 +13,7 @@ curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \ ...@@ -13,7 +13,7 @@ curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \
SYSTEM_AGENT_INSTALLER_K3S_REPO="https://api.github.com/repos/rancher/system-agent-installer-k3s/dispatches" SYSTEM_AGENT_INSTALLER_K3S_REPO="https://api.github.com/repos/rancher/system-agent-installer-k3s/dispatches"
# send dispatch event to SYSTEM_AGENT_INSTALLER_K3S_REPO # send dispatch event to SYSTEM_AGENT_INSTALLER_K3S_REPO
curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \ curl -XPOST -H "Authorization: Bearer ${K3S_RELEASE_TOKEN}" \
-H "Accept: application/vnd.github.everest-preview+json" \ -H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" $SYSTEM_AGENT_INSTALLER_K3S_REPO \ -H "Content-Type: application/vnd.github+json" $SYSTEM_AGENT_INSTALLER_K3S_REPO \
--data '{"event_type": "create_tag", "client_payload": {"tag":"'"$DRONE_TAG"'"}}' --data '{"event_type": "create_tag", "client_payload": {"tag":"'"$DRONE_TAG"'"}}'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment