Skip to content

Bump Node.js version to 20.11.1 #187

Bump Node.js version to 20.11.1

Bump Node.js version to 20.11.1 #187

Workflow file for this run

name: Build
on:
pull_request:
workflow_dispatch:
jobs:
get-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: output matrix
id: set-matrix
run: bash .github/scripts/get-matrix.sh
build:
needs: get-matrix
if: "!contains(github.event.head_commit.message, 'skip-build')"
name: Build
strategy:
fail-fast: false
matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prep
id: prep
run: bash .github/scripts/prep-environment.sh
env:
PLATFORM: ${{ matrix.platform }}
TAGS: ${{ matrix.tags }}
FILE: ${{ matrix.file }}
- name: Set up Docker Buildx
if: steps.prep.outcome == 'success'
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
if: steps.prep.outcome == 'success'
uses: docker/setup-qemu-action@v2
- name: Cache Docker layers
if: steps.prep.outcome == 'success'
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: "${{ steps.prep.outputs.key }}-buildx-${{ github.sha }}-20220222"
restore-keys: "${{ steps.prep.outputs.key }}-buildx-${{ github.sha }}-20220222"
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
- name: Build Multiarch
if: matrix.platform == 'multi' && steps.prep.outcome == 'success'
uses: docker/build-push-action@v3
with:
push: true
file: ./Dockerfile_${{ matrix.file }}
platforms: ${{ steps.prep.outputs.multi }}
tags: ${{ steps.prep.outputs.tags }}
build-args: ${{ matrix.build_args }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Build specific arch
if: matrix.platform != 'multi' && steps.prep.outcome == 'success'
uses: docker/build-push-action@v3
with:
push: true
file: ./Dockerfile_${{ matrix.file }}
platforms: ${{ matrix.platform }}
tags: ${{ steps.prep.outputs.ptags }}
build-args: ${{ matrix.build_args }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
description:
runs-on: ubuntu-latest
name: Description
needs: [build]
strategy:
matrix:
repository: [shivammathur/node, setupphp/node]
steps:
- uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
repository: ${{ matrix.repository }}
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [build]
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}