Skip to content

Commit

Permalink
ISSUE-220: do not use npx for action validator, use binaries (#676)
Browse files Browse the repository at this point in the history
* ISSUE-220: do not use npx for action validator, use binaries

* ISSUE-220: fix typo

* ISSUE-220: fix typo

* ISSUE-220: moving action-validator download to our dev binary installer plugin class

* ISSUE-220: action-validator not needed in the production installer

* Require drainpipe-dev so we can test validating actions

* Actually install drainpipe-dev #protip

* ALlow the drainpipe-dev plugin too

* debugging

* Fix wrong position of array values

* Revert "debugging"

This reverts commit 283be54.

---------

Co-authored-by: Andrew Berry <[email protected]>
  • Loading branch information
beto-aveiga and deviantintegral authored Sep 23, 2024
1 parent acd31ea commit fc52958
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/TestGitHubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:
ddev composer config --no-plugins allow-plugins.composer/installers true
ddev composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true
ddev composer config --no-plugins allow-plugins.lullabot/drainpipe true
ddev composer config --no-plugins allow-plugins.lullabot/drainpipe-dev true
ddev composer config repositories.drainpipe --json '{"type": "path", "url": "drainpipe", "options": {"symlink": false}}'
ddev composer config repositories.drainpipe-dev --json '{"type": "path", "url": "drainpipe/drainpipe-dev", "options": {"symlink": false}}'
ddev composer config minimum-stability dev
ddev composer require lullabot/drainpipe --with-all-dependencies
ddev composer require --dev lullabot/drainpipe-dev --with-all-dependencies
- name: Install Drupal
run: |
Expand Down
14 changes: 14 additions & 0 deletions drainpipe-dev/src/DevBinaryInstallerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,19 @@ class DevBinaryInstallerPlugin extends BinaryInstaller {
'hashalgo' => 'sha256',
'version' => '1.0.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',
],
];
}
14 changes: 0 additions & 14 deletions src/BinaryInstallerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ class BinaryInstallerPlugin extends BinaryInstaller
'hashalgo' => 'sha256',
'version' => '3.38.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
3 changes: 2 additions & 1 deletion tasks/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ tasks:
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
yamls=$(find $directories -type f \( -iname '*.yaml' -o -iname '*.yml' \))
echo $yamls | xargs -n1 action-validator
fi
composer-lock-diff:
Expand Down

0 comments on commit fc52958

Please sign in to comment.