69 lines
2.3 KiB
YAML
69 lines
2.3 KiB
YAML
name: Build and push Almalinux 9 to docker.io
|
|
|
|
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
|
|
with:
|
|
registry: git.winteraccess.id
|
|
username: ${{ vars.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Build and push almalinux9
|
|
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
|
|
git.winteraccess.id/almalinux:9.5
|
|
git.winteraccess.id/almalinux:9
|
|
git.winteraccess.id/almalinux:latest
|
|
- name: Build and push almalinux9-micro
|
|
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
|
|
git.winteraccess.id/almalinux:9.5-micro
|
|
git.winteraccess.id/almalinux:9-micro
|
|
- 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'
|