Skip to content

ci

ci #63

Workflow file for this run

name: ci
on:
schedule:
# build every first of the month
- cron: '0 0 1 * *'
push:
pull_request:
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- node: 16
tags: "ghcr.io/pluswerk/node-dev:16,pluswerk/node-dev:16"
- node: 17
tags: "ghcr.io/pluswerk/node-dev:17,pluswerk/node-dev:17"
- node: 18
tags: "ghcr.io/pluswerk/node-dev:lts,ghcr.io/pluswerk/node-dev:18,pluswerk/node-dev:lts,pluswerk/node-dev:18"
- node: 19
tags: "ghcr.io/pluswerk/node-dev:19,pluswerk/node-dev:19"
- node: 20
tags: "ghcr.io/pluswerk/node-dev:20,pluswerk/node-dev:20"
#- node: 21
# tags: "ghcr.io/pluswerk/node-dev,ghcr.io/pluswerk/node-dev:current,ghcr.io/pluswerk/node-dev:21,pluswerk/node-dev,pluswerk/node-dev:current,pluswerk/node-dev:21"
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push ${{ matrix.node }}
id: docker_build
uses: docker/build-push-action@v5
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ matrix.tags }}
build-args: FROM=node:${{ matrix.node }}
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
-
name: Image digest
run: |
echo ${{ steps.docker_build.outputs.digest }}
echo ${{ steps.docker_build_dev.outputs.digest }}