mirror of
https://codeberg.org/gigirassy/teletraan.git
synced 2026-08-30 15:27:38 +00:00
Update .forgejo/workflows/docker.yml
This commit is contained in:
@@ -11,6 +11,17 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: latest
|
||||
dockerfile: Dockerfile
|
||||
tag: latest
|
||||
- name: mimalloc
|
||||
dockerfile: Dockerfile.mimalloc
|
||||
tag: mimalloc
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -33,8 +44,9 @@ jobs:
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--output type=docker,dest=image.tar \
|
||||
-t local-image:scan \
|
||||
--file ${{ matrix.dockerfile }} \
|
||||
--output type=docker,dest=image-${{ matrix.name }}.tar \
|
||||
-t local-${{ matrix.name }}:scan \
|
||||
.
|
||||
|
||||
- name: Scan image with Grype
|
||||
@@ -42,7 +54,7 @@ jobs:
|
||||
docker run --rm \
|
||||
-v $(pwd):/work \
|
||||
anchore/grype:latest \
|
||||
docker-archive:/work/image.tar \
|
||||
docker-archive:/work/image-${{ matrix.name }}.tar \
|
||||
--fail-on high \
|
||||
-o table
|
||||
|
||||
@@ -51,7 +63,8 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./${{ matrix.dockerfile }}
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_REPO }}:latest
|
||||
${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_REPO }}:${{ matrix.tag }}
|
||||
Reference in New Issue
Block a user