ci: build and publish AEvolution image
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: Build and publish AEvolution
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure release build
|
||||
run: cmake --preset release -B build/ci
|
||||
- name: Build
|
||||
run: cmake --build build/ci --parallel 2
|
||||
- name: Test
|
||||
run: ctest --test-dir build/ci --output-on-failure --no-tests=error --timeout 120
|
||||
|
||||
publish:
|
||||
if: gitea.event_name == 'push'
|
||||
needs: verify
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check Docker
|
||||
run: docker version
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.HARBOR_HOST }}
|
||||
username: ${{ secrets.HARBOR_USERNAME }}
|
||||
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: deploy/docker/Dockerfile
|
||||
push: true
|
||||
tags: ${{ vars.HARBOR_HOST }}/${{ vars.HARBOR_PROJECT }}/aevolution:${{ gitea.sha }}
|
||||
provenance: true
|
||||
sbom: true
|
||||
Reference in New Issue
Block a user