-
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.46 KB
/
composer-dependency.yml
File metadata and controls
46 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# .github/workflows/composer-dependency.yml
##
# Add and remove WordPress themes or plugins using Composer.
##
name: 🐘 Composer Dependency
run-name: composer-dependency
# Run when a new issue is opened
on:
issues:
types: [opened]
env:
environment: staging
jobs:
composer-plugin:
if: ${{ github.event.label.name == 'dependencies' }}
runs-on: ubuntu-latest
steps:
# Checkout the repo's staging branch.
- uses: actions/checkout@v3
with:
ref: ${{ env.environment }}
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
# Parse the issue
- uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: ./.github/ISSUE_TEMPLATE/plugin.yml
# Install or remove WordPress plugins using Composer
- uses: ./.github/actions/composer
name: Composer Action
with:
action: ${{ steps.issue-parser.outputs.issueparser_action }}
repository: ${{ steps.issue-parser.outputs.issueparser_repository }}
package: ${{ steps.issue-parser.outputs.issueparser_package }}
version: ${{ steps.issue-parser.outputs.issueparser_version }}
constraint: ${{ steps.issue-parser.outputs.issueparser_constraint }}
composer_json_path: ./site/composer.json
actor: ${{ github.actor }}
issue_number: ${{ github.event.issue.number }}
github_token: ${{ secrets.GITHUB_TOKEN }}