Skip to content

Commit

Permalink
chore: switch approach to use workflow run
Browse files Browse the repository at this point in the history
  • Loading branch information
luislard committed Feb 10, 2025
1 parent 4f16a51 commit 0de8c4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ jobs:
for package in ${unique_packages[@]}; do
echo "Processing package: $package"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ env.GH_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$package/dispatches \
-d '{"event_type":"update_wp_dependencies","client_payload":{"wp_version":"${{ env.WP_DIST_TAG }}"}}'
gh workflow run update-wordpress-js-dependencies.yml \
--repo $package \
--field WP_DIST_TAG=${{ env.WP_DIST_TAG }}
done
2 changes: 1 addition & 1 deletion .github/workflows/update-wordpress-js-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
GITHUB_USER_NAME: ${{ secrets.GITHUB_USER_NAME }}
GITHUB_USER_SSH_KEY: ${{ secrets.GITHUB_USER_SSH_KEY }}
GITHUB_USER_SSH_PUBLIC_KEY: ${{ secrets.GITHUB_USER_SSH_PUBLIC_KEY }}
WP_DIST_TAG: ${{ github.event.client_payload.wp_version || inputs.WP_DIST_TAG }}
WP_DIST_TAG: ${{ inputs.WP_DIST_TAG }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
NPM_REGISTRY_DOMAIN: ${{ inputs.NPM_REGISTRY_DOMAIN }}

Expand Down
2 changes: 0 additions & 2 deletions docs/update-wp-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ on:
default: 'wp-6.7'
required: true
type: string
repository_dispatch:
types: [ 'update_wp_dependencies' ]

jobs:
update-dependencies:
Expand Down

0 comments on commit 0de8c4e

Please sign in to comment.