nodejs/.gitea/workflows/alpine-dockerio.yaml

128 lines
3.7 KiB
YAML

name: Build and Push Alpine 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.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.14
push: true
tags: |
aprimediet/nodejs:14-alpine
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.16
push: true
tags: |
aprimediet/nodejs:16-alpine
- name: Build and push 18.19.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.18
push: true
tags: |
aprimediet/nodejs:18-alpine
- name: Build and push 20.15.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.20
push: true
tags: |
aprimediet/nodejs:20-alpine
aprimediet/nodejs:latest-alpine
aprimediet/nodejs:alpine
build-rootless:
name: Build and push image (rootless)
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.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.14
push: true
tags: |
aprimediet/nodejs:14-rootless-alpine
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.16
push: true
tags: |
aprimediet/nodejs:16-rootless-alpine
- name: Build and push 18.19.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.18
push: true
tags: |
aprimediet/nodejs:18-rootless-alpine
- name: Build and push 20.15.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.20
push: true
tags: |
aprimediet/nodejs:20-rootless-alpine
aprimediet/nodejs:latest-rootless-alpine
aprimediet/nodejs:rootless-alpine