-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add GHA_* parameters to CircleCI config
- Loading branch information
Showing
1 changed file
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,25 @@ | |
# - Plugin located at /home/circleci/project/wpgraphql-content-blocks | ||
|
||
version: 2.1 | ||
## | ||
# The `GHA_Event` parameter will be populated with the value `release` when triggered by | ||
# the GitHub workflow. This can be used in conditional statements to run a specific workflow | ||
# for a specific event. | ||
## | ||
parameters: | ||
GHA_Event: | ||
type: string | ||
default: "" | ||
GHA_Actor: | ||
type: string | ||
default: "" | ||
GHA_Action: | ||
type: string | ||
default: "" | ||
GHA_Meta: | ||
type: string | ||
default: "" | ||
|
||
orbs: | ||
php: circleci/[email protected] | ||
wp-product-orb: wpengine/[email protected] | ||
|
@@ -36,6 +55,7 @@ jobs: | |
root: . | ||
paths: | ||
- <<parameters.slug>> | ||
|
||
plugin-build-json: | ||
executor: wp-product-orb/parser | ||
environment: | ||
|
@@ -83,17 +103,15 @@ jobs: | |
version: $BUILD_VERSION | ||
|
||
workflows: | ||
plugin: | ||
deploy: | ||
when: | ||
equal: [ "release", << pipeline.parameters.GHA_Event >> ] | ||
jobs: | ||
- plugin-unzip: | ||
slug: wpgraphql-content-blocks | ||
filename: wp-graphql-content-blocks.php | ||
# Run this job on every commit/PR so the plugin is available as a build artifact | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
- canary | ||
tags: | ||
only: /.*/ | ||
- plugin-build-json: | ||
|