Skip to content

Commit

Permalink
[v1.28] System agent push tags fix (#8568)
Browse files Browse the repository at this point in the history
* change script and drone

Signed-off-by: Johnatas <[email protected]>

* adjust secret

Signed-off-by: Johnatas <[email protected]>

---------

Signed-off-by: Johnatas <[email protected]>
  • Loading branch information
Johnatas authored Oct 6, 2023
1 parent a5485a5 commit ba750e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -673,12 +673,15 @@ steps:

- name: dispatch
image: curlimages/curl:7.74.0
secrets: [ pat_username, github_token, release_token_k3s ]
user: root
environment:
PAT_USERNAME:
from_secret: pat_username
PAT_TOKEN:
from_secret: github_token
K3S_RELEASE_TOKEN:
from_secret: release_token_k3s
commands:
- apk -U --no-cache add bash
- scripts/dispatch
Expand Down
4 changes: 2 additions & 2 deletions scripts/dispatch
Original file line number Diff line number Diff line change
Expand Up @@ -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"

# 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 "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"'"}}'

0 comments on commit ba750e2

Please sign in to comment.