import demo-app template
build / build (push) Has been cancelled

This commit is contained in:
admin
2026-05-26 13:52:14 +04:00
parent 69f64da7c4
commit b48b20c926
5 changed files with 123 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
name: build
on:
push:
branches: [main]
workflow_dispatch:
env:
REGISTRY: harbor.furynrage.com
IMAGE: harbor.furynrage.com/demo-app/app
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Zot
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Compute tag
id: tag
run: echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: Build & push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: true
tags: |
${{ env.IMAGE }}:${{ steps.tag.outputs.sha }}
${{ env.IMAGE }}:latest
- name: Trivy scan
uses: aquasecurity/trivy-action@0.24.0
with:
image-ref: ${{ env.IMAGE }}:${{ steps.tag.outputs.sha }}
format: table
severity: CRITICAL,HIGH
exit-code: '0' # для демо не падаем, только репорт