Skip to content

chore(deps): update node.js to v20.18.0 #390

chore(deps): update node.js to v20.18.0

chore(deps): update node.js to v20.18.0 #390

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
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-24.04
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
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-24.04
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
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-24.04
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
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-24.04
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Run export-secrets
uses: ./
with:
secrets: |
{
"FOO": "foo",
"TF_VAR_FOO": "tf-var-foo",
"TF_TOKEN_EXAMPLE_COM": "tf-token-example-com"
}
downcase-tf-var: true
downcase-tf-token: true
- name: Check environment variables
run: |
FAILED=''
assert_env() {
local KEY="$1"
local EXPECTED="$2"
local ACTUAL="${!KEY}"
if [[ "$EXPECTED" = "$ACTUAL" ]]; then
echo "PASSED: $KEY"
else
echo "FAILED: $KEY" 1>&2
echo " expected: $EXPECTED" 1>&2
echo " actual: $ACTUAL" 1>&2
FAILED='true'
fi
}
assert_env 'FOO' 'foo'
assert_env 'TF_VAR_FOO' ''
assert_env 'TF_VAR_foo' 'tf-var-foo'
assert_env 'TF_TOKEN_EXAMPLE_COM' ''
assert_env 'TF_TOKEN_example_com' 'tf-token-example-com'
if [[ -n "$FAILED" ]]; then
echo "Test failed" 1>&2
exit 1
fi