Skip to content

Add GitHub workflow

Add GitHub workflow #2

Workflow file for this run

name: "Run build and deploy"
on:
push:
branches: [ 'master' ]
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 19, 20, 21]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Execute image build and push
run: |
docker build -t ghcr.io/pcvolkmer/jenkins-slave-nodejs:${{matrix.node-version}} ${{matrix.node-version}}
docker push ghcr.io/pcvolkmer/jenkins-slave-nodejs:${{matrix.node-version}}