92 lines
2.8 KiB
YAML
92 lines
2.8 KiB
YAML
name: Build and push Alpine Linux container images
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Build alpine linux container images
|
|
container:
|
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
runs-on: ubuntu-latest
|
|
# needs:
|
|
# - prepare
|
|
strategy:
|
|
matrix:
|
|
# version: ${{ fromJson(needs.prepare.outputs.versions) }}
|
|
params:
|
|
- version: "3.5"
|
|
- version: "3.6"
|
|
- version: "3.7"
|
|
- version: "3.8"
|
|
- version: "3.9"
|
|
- version: "3.10"
|
|
- version: "3.11"
|
|
- version: "3.12"
|
|
- version: "3.13"
|
|
- version: "3.14"
|
|
- version: "3.15"
|
|
- version: "3.16"
|
|
- version: "3.17"
|
|
- version: "3.18"
|
|
- version: "3.19"
|
|
- version: "3.20"
|
|
- version: "3.21"
|
|
major_version: "3"
|
|
major_edition: "true"
|
|
latest: "true"
|
|
- version: "edge"
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: Login to quay.io
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ vars.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_SECRET }}
|
|
# - name: Set up QEMU
|
|
# uses: docker/setup-qemu-action@v3
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Build and push alpine linux container image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
# platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
context: .
|
|
build-args: |
|
|
OS_VERSION=${{ matrix.params.version }}
|
|
tags: |
|
|
quay.io/teras/alpine:${{ matrix.params.version }}
|
|
- if: ${{ matrix.params.major_edition == 'true' }}
|
|
name: Build and push latest alpine linux major version container image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
# platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
context: .
|
|
build-args: |
|
|
OS_VERSION=${{ matrix.params.version }}
|
|
tags: |
|
|
quay.io/teras/alpine:${{ matrix.params.major_version }}
|
|
- if: ${{ matrix.params.latest == 'true' }}
|
|
name: Build and push latest alpine linux container image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
# platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
context: .
|
|
build-args: |
|
|
OS_VERSION=${{ matrix.params.version }}
|
|
tags: |
|
|
quay.io/teras/alpine:latest
|
|
# - name: Scan container image with Trivy
|
|
# uses: aquasecurity/trivy-action@0.20.0
|
|
# with:
|
|
# image-ref: 'quay.io/teras/alpine:${{ matrix.version }}'
|
|
# format: 'sarif'
|
|
# output: 'trivy-results.sarif'
|