Skip to content

Commit

Permalink
ci: Add GHA_* parameters to CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
mindctrl committed Jan 23, 2024
1 parent 9b376ca commit 82e2599
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -36,6 +55,7 @@ jobs:
root: .
paths:
- <<parameters.slug>>

plugin-build-json:
executor: wp-product-orb/parser
environment:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 82e2599

Please sign in to comment.