name: build nodejs on: workflow_dispatch: push: tags: - 'nodejs-*' pull_request: push: branches: - '**' jobs: docker: runs-on: ubuntu-latest strategy: fail-fast: false matrix: v: - 12 - 14 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 steps: - name: Checkout uses: actions/checkout@v4 - name: Login to registry (tags only) if: startsWith(github.ref, 'refs/tags/') uses: docker/login-action@v3 with: registry: git.chillcog.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Build & push uses: docker/build-push-action@v6 with: context: ./nodejs/${{ matrix.v }} file: ./nodejs/${{ matrix.v }}/Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ startsWith(github.ref, 'refs/tags/') }} tags: | git.chillcog.com/yolks/nodejs:${{ matrix.v }} ${{ startsWith(github.ref, 'refs/tags/') && format('git.chillcog.com/yolks/nodejs:{0}', github.ref_name) || '' }}