79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
name: Build and Push Alpine NGINX Image to docker.io Registry
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and push ubi9 image
|
|
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 1.22
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9
|
|
build-args: |
|
|
NGINX_VERSION=1.22
|
|
push: true
|
|
tags: |
|
|
aprimediet/nginx:1.22-ubi9
|
|
- name: Build and push 1.24
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9
|
|
build-args: |
|
|
NGINX_VERSION=1.24
|
|
push: true
|
|
tags: |
|
|
aprimediet/nginx:1.24-ubi9
|
|
aprimediet/nginx:ubi9
|
|
build-micro:
|
|
name: Build and push ubi9-micro image
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
needs:
|
|
- build
|
|
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 1.22
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9-micro
|
|
build-args: |
|
|
NGINX_VERSION=1.22
|
|
push: true
|
|
tags: |
|
|
aprimediet/nginx:1.22-ubi9-micro
|
|
- name: Build and push 1.24
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9-micro
|
|
build-args: |
|
|
NGINX_VERSION=1.24
|
|
push: true
|
|
tags: |
|
|
aprimediet/nginx:1.24-ubi9-micro
|
|
aprimediet/nginx:ubi9-micro |