Skip to content

Merge pull request #13 from Stocard/node-18 #6

Merge pull request #13 from Stocard/node-18

Merge pull request #13 from Stocard/node-18 #6

name: Docker Image Build & Push
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
NODE: [12, 14, 16, 18]
steps:
- uses: actions/checkout@v2
- name: Insert node version into Dockerfile
run: sed -i "s/{VERSION}/${{ matrix.NODE }}/g" ./Dockerfile
- name: Build the Docker image
run: docker build -t stocard/node:${{ matrix.NODE }} .
- name: Push docker image to dockerhub
run: docker login -u="${{ secrets.DOCKER_USERNAME }}" -p="${{ secrets.DOCKER_PASSWORD }}" && docker push stocard/node:${{ matrix.NODE }} && docker logout