-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
34,765 additions
and
2 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 @@ | ||
dist/ |
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,30 @@ | ||
/** @type {import("eslint/lib/shared/types").ConfigData} */ | ||
module.exports = { | ||
env: { | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
], | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true, | ||
}, | ||
files: [".eslintrc.{js,cjs}"], | ||
parserOptions: { | ||
sourceType: "script", | ||
}, | ||
}, | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: {}, | ||
}; |
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,21 @@ | ||
name: actionlint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Download actionlint | ||
id: get_actionlint | ||
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
shell: bash | ||
- name: Check workflow files | ||
run: ${{ steps.get_actionlint.outputs.executable }} -color | ||
shell: bash |
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,122 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: package.json | ||
cache: npm | ||
- name: Run npm ci | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Check diff | ||
run: | | ||
if ! git diff --no-patch --exit-code; then | ||
echo Diff found 1>&2 | ||
exit 1 | ||
fi | ||
lint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: package.json | ||
cache: npm | ||
- name: Run npm ci | ||
run: npm ci | ||
- name: Run ESLint | ||
run: npm run lint | ||
|
||
format: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: package.json | ||
cache: npm | ||
- name: Run npm ci | ||
run: npm ci | ||
- name: Run Prettier format check | ||
run: npm run format:check | ||
|
||
test-node: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: package.json | ||
cache: npm | ||
- name: Run npm ci | ||
run: npm ci | ||
- name: Test | ||
run: npm test | ||
|
||
test-action: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Run export-secrets-action | ||
uses: ./ | ||
with: | ||
secrets: '{"KEY_A":"VALUE_A","KEY_B":"VALUE_B","KEY_C":"VALUE_C"}' | ||
- name: Check environment variables | ||
run: | | ||
EXPECTED_VALUE_KEY_A='VALUE_A' | ||
EXPECTED_VALUE_KEY_B='VALUE_B' | ||
EXPECTED_VALUE_KEY_C='VALUE_C' | ||
FAILED='false' | ||
if [ "$KEY_A" = "$EXPECTED_VALUE_KEY_A" ]; then | ||
echo 'PASSED: VALUE_A' | ||
else | ||
echo 'FAILED: VALUE_A' 1>&2 | ||
echo " expected: $EXPECTED_VALUE_KEY_A" 1>&2 | ||
echo " actual: $KEY_A" 1>&2 | ||
FAILED='true' | ||
fi | ||
if [ "$KEY_B" = "$EXPECTED_VALUE_KEY_B" ]; then | ||
echo 'PASSED: VALUE_B' | ||
else | ||
echo 'FAILED: VALUE_B' 1>&2 | ||
echo " expected: $EXPECTED_VALUE_KEY_B" 1>&2 | ||
echo " actual: $KEY_B" 1>&2 | ||
FAILED='true' | ||
fi | ||
if [ "$KEY_C" = "$EXPECTED_VALUE_KEY_C" ]; then | ||
echo 'PASSED: VALUE_C' | ||
else | ||
echo 'FAILED: VALUE_C' 1>&2 | ||
echo " expected: $EXPECTED_VALUE_KEY_C" 1>&2 | ||
echo " actual: $KEY_C" 1>&2 | ||
FAILED='true' | ||
fi | ||
if [ "$FAILED" = 'true' ]; then | ||
exit 1 | ||
fi |
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,16 @@ | ||
name: renovate-config-validator | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
renovate-config-validator: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Run renovate-config-validator | ||
uses: suzuki-shunsuke/github-action-renovate-config-validator@b54483862375f51910a60c4f498e927d4f3df466 # v1.0.1 |
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 |
---|---|---|
|
@@ -89,7 +89,7 @@ out | |
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
# dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
|
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 @@ | ||
dist/ |
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 |
---|---|---|
@@ -1 +1,12 @@ | ||
# export-secrets-action | ||
# export-secrets-action | ||
|
||
Export GitHub Actions secrets as environment variables. | ||
|
||
## Usage | ||
|
||
```yml | ||
steps: | ||
- uses: koyashiro/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
``` |
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,10 @@ | ||
name: export-secrets-action | ||
author: koyashiro <[email protected]> | ||
description: Export GitHub Actions secrets as environment variables | ||
inputs: | ||
secrets: | ||
description: JSON representation of secrets | ||
required: true | ||
runs: | ||
using: node20 | ||
main: dist/index.js |
Oops, something went wrong.