-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from balena-io-modules/drivelist
Update resin-device-operations to v2
- Loading branch information
Showing
6 changed files
with
125 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
name: "Test custom" | ||
description: "Custom test step to run during a pull request" | ||
# this inputs are always provided by flowzone, so they must always be defined on the composite action | ||
inputs: | ||
json: | ||
description: "JSON stringified object containing all the inputs from the calling workflow" | ||
required: true | ||
secrets: | ||
description: "JSON stringified object containing all the secrets from the calling workflow" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Node.js 18 | ||
if: ${{ fromJSON(env.os_value)[0] == 'ubuntu-20.04' }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Setup Node.js lts | ||
if: ${{ fromJSON(env.os_value)[0] != 'ubuntu-20.04' }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
if [ -e package-lock.json ]; then | ||
npm ci | ||
else | ||
npm i | ||
fi | ||
- name: Run custom node tests | ||
shell: bash | ||
run: | | ||
# os_value is a JSON array of runner labels but we are only looking at the first element | ||
echo "OS: ${{ fromJSON(env.os_value)[0] }}" | ||
node -v | ||
npm -v | ||
export TEST_EMAIL_KEY=${{ format('TEST_EMAIL{0}', fromJSON('{"windows-2019":"","ubuntu-20.04":"_1","macos-12":"_2"}')[fromJSON(env.os_value)[0]]) }} | ||
export TEST_EMAIL=${{ fromJSON(inputs.secrets)[ format('TEST_EMAIL{0}', fromJSON('{"windows-2019":"","ubuntu-20.04":"_1","macos-12":"_2"}')[fromJSON(env.os_value)[0]]) ] }} | ||
export TEST_PASSWORD=${{ fromJSON(inputs.secrets).TEST_PASSWORD }} | ||
echo "TEST_EMAIL_KEY: [ ${TEST_EMAIL_KEY} ]" | ||
echo "TEST_EMAIL: [ ${TEST_EMAIL} ]" | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Flowzone | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, closed] | ||
branches: [main, master] | ||
# allow external contributions to use secrets within trusted code | ||
pull_request_target: | ||
types: [opened, synchronize, closed] | ||
branches: [main, master] | ||
|
||
jobs: | ||
flowzone: | ||
name: Flowzone | ||
uses: product-os/flowzone/.github/workflows/flowzone.yml@master | ||
# prevent duplicate workflows and only allow one `pull_request` or `pull_request_target` for | ||
# internal or external contributions respectively | ||
if: | | ||
(github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request') || | ||
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target') | ||
secrets: inherit | ||
with: | ||
custom_runs_on: '[["windows-2019"],["ubuntu-20.04"],["macos-12"]]' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters