first commit
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m4s
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m4s
This commit is contained in:
commit
6fc0a01c56
51 changed files with 11319 additions and 0 deletions
48
.forgejo/workflows/build.yml
Normal file
48
.forgejo/workflows/build.yml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Verify and publish Calio container
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
if: github.event.deleted != true
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JOB_IMAGE: calio-ci:${{ github.run_id }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Node 24
|
||||
uses: https://github.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
- name: Install locked dependencies
|
||||
run: npm ci --no-audit --no-fund
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
- name: Build application
|
||||
run: npm run build
|
||||
- name: Build production container
|
||||
env:
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
run: docker build --label "org.opencontainers.image.revision=$COMMIT_SHA" -t "$JOB_IMAGE" .
|
||||
- name: Smoke test container and persistent data
|
||||
run: |
|
||||
node scripts/container-smoke.js "$JOB_IMAGE"
|
||||
node scripts/container-smoke.js "$JOB_IMAGE" --unraid
|
||||
- name: Publish image to Forgejo registry
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
env:
|
||||
FORGEJO_PAT: ${{ secrets.FORGEJO_PAT }}
|
||||
SOURCE_IMAGE: ${{ env.JOB_IMAGE }}
|
||||
REGISTRY_USERNAME: ${{ vars.REGISTRY_USERNAME || github.repository_owner }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
CI_EVENT: ${{ github.event_name }}
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
TARGET_REF: ${{ github.ref }}
|
||||
MAIN_BRANCH: ${{ github.event.repository.default_branch || 'main' }}
|
||||
run: node scripts/publish-image.js
|
||||
- name: Remove temporary build tag
|
||||
if: always()
|
||||
run: docker image rm "$JOB_IMAGE" || true
|
||||
Loading…
Add table
Add a link
Reference in a new issue