chore(deps): update node.js to v22.13.1 (patch) #2964
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
permissions: | |
contents: read | |
env: | |
NODE_VERSION: 22 | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
lint-eslint: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Clean install | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
lint-dockerfile: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0 | |
with: | |
dockerfile: Dockerfile | |
test: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18, 20, 22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- name: Clean install | |
run: npm ci | |
- name: Test | |
run: npm run test | |
test-e2e: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18, 20, 22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- name: Clean install | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Test e2e | |
run: npm run e2e | |
release: | |
needs: | |
- setup | |
- lint-eslint | |
- lint-dockerfile | |
- test | |
- test-e2e | |
runs-on: ubuntu-latest | |
outputs: | |
new_release_published: ${{ steps.semantic.outputs.new_release_published }} | |
new_release_version: ${{ steps.semantic.outputs.new_release_version }} | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/exec | |
@semantic-release/git | |
id: semantic | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
publish: | |
needs: | |
- release | |
if: needs.release.outputs.new_release_published == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5 | |
with: | |
images: anclarma/blog-angular | |
- name: Build and push Docker image | |
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d # v6 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: anclarma/blog-angular:${{ needs.release.outputs.new_release_version }},anclarma/blog-angular:latest | |
labels: ${{ steps.meta.outputs.labels }} |