mirror of https://github.com/k3s-io/k3s
Merge pull request #1456 from galal-hussein/new_branch
Send dispatch event with dronepull/1462/head
commit
f31a8d9e94
34
.drone.yml
34
.drone.yml
|
@ -286,3 +286,37 @@ depends_on:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
- arm64
|
||||||
- arm
|
- arm
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: dispatch
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: dispatch
|
||||||
|
image: rancher/dapper:v0.4.2
|
||||||
|
environment:
|
||||||
|
PAT_USERNAME:
|
||||||
|
from_secret: pat_username
|
||||||
|
PAT_TOKEN:
|
||||||
|
from_secret: pat_token
|
||||||
|
commands:
|
||||||
|
- dapper dispatch
|
||||||
|
volumes:
|
||||||
|
- name: docker
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
when:
|
||||||
|
instance:
|
||||||
|
- drone-publish.rancher.io
|
||||||
|
ref:
|
||||||
|
- refs/head/master
|
||||||
|
- refs/tags/*
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
volumes:
|
||||||
|
- name: docker
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
REPO="https://api.github.com/repos/rancher/k3s-upgrade/dispatches"
|
||||||
|
|
||||||
|
# send dispatch event to REPO
|
||||||
|
curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \
|
||||||
|
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||||
|
-H "Content-Type: application/json" $REPO \
|
||||||
|
--data '{"event_type": "create_tag", "client_payload": {"tag":"'"$DRONE_TAG"'"}}'
|
Loading…
Reference in New Issue