A simple plugin to control GitHub workflows
Go to file
Dorian Zedler ebc6fba02b
Chore: initial commit
2022-08-08 12:24:26 +02:00
docker Chore: initial commit 2022-08-08 12:24:26 +02:00
plugin Chore: initial commit 2022-08-08 12:24:26 +02:00
scripts Chore: initial commit 2022-08-08 12:24:26 +02:00
.drone.yml Chore: initial commit 2022-08-08 12:24:26 +02:00
.drone.yml.multiarch Chore: initial commit 2022-08-08 12:24:26 +02:00
.gitignore Chore: initial commit 2022-08-08 12:24:26 +02:00
LICENSE.md Chore: initial commit 2022-08-08 12:24:26 +02:00
README.md Chore: initial commit 2022-08-08 12:24:26 +02:00
go.mod Chore: initial commit 2022-08-08 12:24:26 +02:00
go.sum Chore: initial commit 2022-08-08 12:24:26 +02:00
main.go Chore: initial commit 2022-08-08 12:24:26 +02:00

README.md

A plugin to A simple plugin to control GitHub workflows.

Usage

The following settings changes this plugin's behavior.

  • param1 (optional) does something.
  • param2 (optional) does something different.

Below is an example .drone.yml that uses this plugin.

kind: pipeline
name: default

steps:
- name: run itsblue.dev/plugins/github-workflow-controller plugin
  image: itsblue.dev/plugins/github-workflow-controller
  pull: if-not-exists
  settings:
    param1: foo
    param2: bar

Building

Build the plugin binary:

scripts/build.sh

Build the plugin image:

docker build -t itsblue.dev/plugins/github-workflow-controller -f docker/Dockerfile .

Testing

Execute the plugin from your current working directory:

docker run --rm -e PLUGIN_PARAM1=foo -e PLUGIN_PARAM2=bar \
  -e DRONE_COMMIT_SHA=8f51ad7884c5eb69c11d260a31da7a745e6b78e2 \
  -e DRONE_COMMIT_BRANCH=master \
  -e DRONE_BUILD_NUMBER=43 \
  -e DRONE_BUILD_STATUS=success \
  -w /drone/src \
  -v $(pwd):/drone/src \
  itsblue.dev/plugins/github-workflow-controller