name: Build and Push Ubuntu NodeJS Image to docker.io Registry on: push: branches: - master jobs: build: name: Build and push image (root user) runs-on: ubuntu-latest container: image: ghcr.io/catthehacker/ubuntu:act-latest steps: - name: Check out repository code uses: actions/checkout@v3 - name: Login to docker.io Registry uses: docker/login-action@v3 with: registry: docker.io username: aprimediet password: ${{ secrets.DOCKER_TOKEN }} - name: Build and push 14.21.3 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.ubuntu build-args: | REGISTRY_URL=aprimediet UBUNTU_VERSION=noble NODE_VERSION=14.21.3 push: true tags: | aprimediet/nodejs:14-ubuntu aprimediet/nodejs:14 - name: Build and push 16.20.2 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.ubuntu build-args: | REGISTRY_URL=aprimediet UBUNTU_VERSION=noble NODE_VERSION=16.20.2 push: true tags: | aprimediet/nodejs:16-ubuntu aprimediet/nodejs:16 - name: Build and push 18.19.1 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.ubuntu build-args: | REGISTRY_URL=aprimediet UBUNTU_VERSION=noble NODE_VERSION=18.19.1 push: true tags: | aprimediet/nodejs:18-ubuntu aprimediet/nodejs:18 - name: Build and push 20.11.1 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.ubuntu build-args: | REGISTRY_URL=aprimediet UBUNTU_VERSION=noble NODE_VERSION=20.15.1 push: true tags: | aprimediet/nodejs:20-ubuntu aprimediet/nodejs:20 aprimediet/nodejs:latest-ubuntu aprimediet/nodejs:latest