Skip to content

✨ add alpine images #76

✨ add alpine images

✨ add alpine images #76

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:
node: [ 16, 17, 18, 19, 20, 21, 22 ]
distroAddon: [ '', '-alpine' ]
include:
- node: 20
distroAddon: ''
additionalTags: "ghcr.io/pluswerk/node-dev:lts${{ matrix.distroAddon }},pluswerk/node-dev:lts${{ matrix.distroAddon }},"

Check failure on line 22 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 22, Col: 29): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.distroAddon
- node: 20
distroAddon: '-alpine'
additionalTags: "ghcr.io/pluswerk/node-dev:lts-alpine,pluswerk/node-dev:lts-alpine,"
- node: 22
distroAddon: ''
additionalTags: "ghcr.io/pluswerk/node-dev:latest,ghcr.io/pluswerk/node-dev:current,pluswerk/node-dev:latest,pluswerk/node-dev:current,"
- node: 22
distroAddon: '-alpine'
additionalTags: "ghcr.io/pluswerk/node-dev:latest-alpine,ghcr.io/pluswerk/node-dev:current-alpine,pluswerk/node-dev:latest-alpine,pluswerk/node-dev:current-alpine,"
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@v6
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ matrix.additionalTags }}ghcr.io/pluswerk/node-dev:${{ matrix.node }}${{ matrix.distroAddon }},pluswerk/node-dev:${{ matrix.node }}${{ matrix.distroAddon }}
build-args: |
FROM=node:${{ matrix.node }}${{ matrix.distroAddon }}
DIST_ADDON=${{ matrix.distroAddon }}
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 }}