almalinux/.gitea/workflows/almalinux.yaml

94 lines
3.2 KiB
YAML

name: Build and push Almalinux 9 container images
on:
push:
branches:
- master
jobs:
build:
name: Build almalinux base container images
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to docker.io
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to git.winteraccess.id
uses: docker/login-action@v3
with:
registry: git.winteraccess.id
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Build and push almalinux8-micro
uses: docker/build-push-action@v5
with:
# platforms: linux/amd64,linux/arm64
push: true
context: .
file: ./8/Dockerfile.micro
build-args: |
ALMALINUX_VERSION=8.10
tags: |
${{ vars.DOCKERHUB_USERNAME }}/almalinux:8.10-micro
${{ vars.DOCKERHUB_USERNAME }}/almalinux:8-micro
- name: Build and push almalinux8
uses: docker/build-push-action@v5
with:
# platforms: linux/amd64,linux/arm64
push: true
context: .
file: ./8/Dockerfile.default
build-args: |
ALMALINUX_VERSION=8.10
tags: |
${{ vars.DOCKERHUB_USERNAME }}/almalinux:8.10
${{ vars.DOCKERHUB_USERNAME }}/almalinux:8
- name: Build and push almalinux9-micro
uses: docker/build-push-action@v5
with:
# platforms: linux/amd64,linux/arm64
push: true
context: .
file: ./9/Dockerfile.micro
build-args: |
ALMALINUX_VERSION=9.5
tags: |
${{ vars.DOCKERHUB_USERNAME }}/almalinux:9.5-micro
${{ vars.DOCKERHUB_USERNAME }}/almalinux:9-micro
${{ vars.DOCKERHUB_USERNAME }}/almalinux:micro
- name: Build and push almalinux9
uses: docker/build-push-action@v5
with:
# platforms: linux/amd64,linux/arm64
push: true
context: .
file: ./9/Dockerfile.default
build-args: |
ALMALINUX_VERSION=9.5
tags: |
${{ vars.DOCKERHUB_USERNAME }}/almalinux:9.5
${{ vars.DOCKERHUB_USERNAME }}/almalinux:9
${{ vars.DOCKERHUB_USERNAME }}/almalinux:latest
# - name: Scan almalinux9 image with Trivy
# uses: aquasecurity/trivy-action@0.20.0
# with:
# image-ref: '${{ vars.DOCKERHUB_USERNAME }}/almalinux:9.5'
# format: 'sarif'
# output: 'trivy-results.sarif'
# - name: Scan almalinux9-micro image with Trivy
# uses: aquasecurity/trivy-action@0.20.0
# with:
# image-ref: '${{ vars.DOCKERHUB_USERNAME }}/almalinux:9.5-micro'
# format: 'sarif'
# output: 'trivy-results.sarif'