83 lines
2.6 KiB
YAML
83 lines
2.6 KiB
YAML
name: Build and Push Alpine NGINX Image to git.winteraccess.id 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 git.winteraccess.id Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.winteraccess.id
|
|
username: ${{ vars.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
- name: Build and push 1.22
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9
|
|
build-args: |
|
|
REGISTRY_URL=git.winteraccess.id/docker
|
|
NGINX_VERSION=1.22
|
|
push: true
|
|
tags: |
|
|
git.winteraccess.id/${{ gitea.repository }}:1.22-ubi9
|
|
- name: Build and push 1.24
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9
|
|
build-args: |
|
|
REGISTRY_URL=git.winteraccess.id/docker
|
|
NGINX_VERSION=1.24
|
|
push: true
|
|
tags: |
|
|
git.winteraccess.id/${{ gitea.repository }}:1.24-ubi9
|
|
git.winteraccess.id/${{ gitea.repository }}: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 git.winteraccess.id Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.winteraccess.id
|
|
username: ${{ vars.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
- name: Build and push 1.22
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9-micro
|
|
build-args: |
|
|
REGISTRY_URL=git.winteraccess.id/docker
|
|
NGINX_VERSION=1.22
|
|
push: true
|
|
tags: |
|
|
git.winteraccess.id/${{ gitea.repository }}:1.22-ubi9-micro
|
|
- name: Build and push 1.24
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile.ubi9-micro
|
|
build-args: |
|
|
REGISTRY_URL=git.winteraccess.id/docker
|
|
NGINX_VERSION=1.24
|
|
push: true
|
|
tags: |
|
|
git.winteraccess.id/${{ gitea.repository }}:1.24-ubi9-micro
|
|
git.winteraccess.id/${{ gitea.repository }}:ubi9-micro |