Update Node.js to v22.9.0 (#1620) #8424
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
name: Tests | |
on: | |
push: | |
branches: | |
- "**" | |
tags-ignore: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
go-test: | |
name: Go Tests | |
permissions: | |
id-token: write | |
contents: read | |
uses: harryzcy/github-actions/.github/workflows/go.yml@main | |
with: | |
working-directory: bff | |
jest-test: | |
name: Jest Tests | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
permissions: | |
id-token: write | |
defaults: | |
run: | |
working-directory: web | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
cli.codecov.io:443 | |
codecov.io:443 | |
github.com:443 | |
registry.npmjs.org:443 | |
storage.googleapis.com:443 | |
uploader.codecov.io:443 | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup Node | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
with: | |
use_oidc: true | |
docker: | |
name: Docker Build | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
auth.docker.io:443 | |
github.com:443 | |
production.cloudflare.docker.com:443 | |
proxy.golang.org:443 | |
registry-1.docker.io:443 | |
registry.npmjs.org:443 | |
storage.googleapis.com:443 | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | |
- name: Get build variables | |
run: | | |
# shellcheck disable=SC2129 | |
echo "BUILD_COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
echo "BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> "$GITHUB_ENV" | |
echo "BUILD_VERSION=$(git describe --tags --always)" >> "$GITHUB_ENV" | |
- name: Check build variables | |
run: | | |
echo "$BUILD_COMMIT" | |
echo "$BUILD_DATE" | |
echo "$BUILD_VERSION" | |
- name: Build docker image | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 | |
with: | |
context: . | |
build-args: | | |
BUILD_DATE=${{ env.BUILD_DATE }} | |
BUILD_COMMIT=${{ env.BUILD_COMMIT }} | |
BUILD_VERSION=${{ env.BUILD_VERSION }} | |
platforms: linux/amd64,linux/arm64/v8 | |
push: false |