diff --git a/README.md b/README.md index 4dab357..585c7f1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Add the following to your `pipeline.yml`: ```yml steps: - plugins: - - wellcomecollection/github-deployments#v0.2.2: + - wellcomecollection/github-deployments#v0.2.3: ref: ${BUILDKITE_COMMIT} environment: stage ``` @@ -28,6 +28,10 @@ The environment to create the deployment for as per https://docs.github.com/en/r The ARN of the role for the plugin to assume when fetching secrets +### `task` (string, default `deploy:weco`) + +The name of the GitHub Deployment task - useful for distinguishing between different deploy types. + ## Development The plugin is written in Typescript and compiled into binaries with https://github.com/vercel/pkg - when you push a tag, a GitHub action will create a release for you. diff --git a/plugin.yml b/plugin.yml index f0b667c..00b7bc7 100644 --- a/plugin.yml +++ b/plugin.yml @@ -10,4 +10,6 @@ configuration: type: string assume_role: type: string + task: + type: string additionalProperties: false diff --git a/src/index.ts b/src/index.ts index 4082573..90e619d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -37,7 +37,7 @@ const main = async () => { environment: config.environment, production_environment: config.environment === "prod" || config.environment === "production", - task: "deploy:weco", + task: config.task, auto_merge: false, required_contexts: [], mediaType: { diff --git a/src/properties.ts b/src/properties.ts index 689ed65..c19d6c5 100644 --- a/src/properties.ts +++ b/src/properties.ts @@ -12,4 +12,5 @@ export const config = { environment: process.env[envVar("environment")] || "stage", ref: process.env[envVar("ref")] || environment.commit, assumeRole: process.env[envVar("assume_role")], + task: process.env[envVar("task")] || "deploy:weco", };