Skip to content

Commit

Permalink
ISSUE-220: replace using npx to execute action-validator, use the bin…
Browse files Browse the repository at this point in the history
…ary instead (#576)

* ISSUE-220: replace using npx to execute action-validator, use a binary instead

---------

Co-authored-by: Sally Young <[email protected]>
  • Loading branch information
beto-aveiga and justafish authored Jun 5, 2024
1 parent e901ea7 commit d8692a0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/BinaryInstallerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ class BinaryInstallerPlugin extends BinaryInstaller
'hashalgo' => 'sha256',
'version' => '3.28.0',
],
'action-validator' => [
'releases' => [
'linux' => [
'amd64' => ['url' => 'https://github.com/mpalmer/action-validator/releases/download/v0.6.0/action-validator_linux_amd64', 'sha' => 'fa61521913ee4cf5de7e4d5b803741b2c60ebde447ee38e2b71abbd213d3354a'],
'arm64' => ['url' => 'https://github.com/mpalmer/action-validator/releases/download/v0.6.0/action-validator_linux_arm64', 'sha' => '38a582690ab7e64ba33b4c29eaf16979ed116d4daf40fde39ec18992c475c0b1'],
],
'darwin' => [
'amd64' => ['url' => 'https://github.com/mpalmer/action-validator/releases/download/v0.6.0/action-validator_darwin_amd64', 'sha' => '10f453ad4ed011eb3866bd35c25311bd2fe1fbf353cbe64793115de2348f8ddb'],
'arm64' => ['url' => 'https://github.com/mpalmer/action-validator/releases/download/v0.6.0/action-validator_darwin_arm64', 'sha' => '68e09e0793cf958daf0aebe69fb2bf858232fb9c4f74f913dab02db67d32224d'],
],
],
'hashalgo' => 'sha256',
'version' => '0.6.0',
],
];

/**
Expand Down
8 changes: 7 additions & 1 deletion tasks/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ tasks:
- |
directories=".github/workflows .github/actions"
if [ "{{ .directories }}" != "" ]; then directories="{{ .directories }}"; fi
find $directories -type f \( -iname '*.yaml' -o -iname '*.yml' \) | xargs -n1 npx @action-validator/cli
if [ -f ./vendor/bin/action-validator ]; then
find $directories -type f \( -iname '*.yaml' -o -iname '*.yml' \) | xargs -n1 ./vendor/bin/action-validator
# Fallback for architectures that don't have a release e.g. Windows
else
find $directories -type f \( -iname '*.yaml' -o -iname '*.yml' \) | xargs -n1 npx @action-validator/cli
fi
composer-lock-diff:
desc: Runs composer-lock-diff on a pull request description and produces a new description
Expand Down

0 comments on commit d8692a0

Please sign in to comment.