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:
@@ -12,6 +12,17 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: latest
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
tag: latest
|
||||||
|
- name: mimalloc
|
||||||
|
dockerfile: Dockerfile.mimalloc
|
||||||
|
tag: mimalloc
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -33,8 +44,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--output type=docker,dest=image.tar \
|
--file ${{ matrix.dockerfile }} \
|
||||||
-t local-image:scan \
|
--output type=docker,dest=image-${{ matrix.name }}.tar \
|
||||||
|
-t local-${{ matrix.name }}:scan \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Scan image with Grype
|
- name: Scan image with Grype
|
||||||
@@ -42,7 +54,7 @@ jobs:
|
|||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v $(pwd):/work \
|
-v $(pwd):/work \
|
||||||
anchore/grype:latest \
|
anchore/grype:latest \
|
||||||
docker-archive:/work/image.tar \
|
docker-archive:/work/image-${{ matrix.name }}.tar \
|
||||||
--fail-on high \
|
--fail-on high \
|
||||||
-o table
|
-o table
|
||||||
|
|
||||||
@@ -51,7 +63,8 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
file: ./${{ matrix.dockerfile }}
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_REPO }}:latest
|
${{ env.REGISTRY_HOST }}/${{ env.REGISTRY_REPO }}:${{ matrix.tag }}
|
||||||
Reference in New Issue
Block a user