Docker-Runit/.github/workflows/node.yml

59 lines
1.6 KiB
YAML

name: Build NodeJS Flavours
on:
push:
paths:
- 'node/**'
pull_request:
branches:
- '!dependabot/**'
workflow_run:
workflows:
- Build Marshall
branches: [ 'master', 'feature/**' ]
types:
- completed
jobs:
node-build-flavours:
name: "Build Node Flavours"
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
yarn:
- "3.0.2"
node:
- "v16.13.0"
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
name: Login to Docker Hub
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: docker/login-action@v2
name: Login to Github Container Registry
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- uses: docker/build-push-action@v3
name: Build & Push
with:
context: node
file: node/Dockerfile
target: nodejs
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: |
gone/node:${{ matrix.node }}-${{ matrix.yarn }}
benzine/node:${{ matrix.node }}-${{ matrix.yarn }}
ghcr.io/benzine-framework/node:${{ matrix.node }}-${{ matrix.yarn }}
build-args: |
NODE_VERSION=${{ matrix.node }}
YARN_VERSION=${{ matrix.yarn }}