Build verified checkpoint containers for TrueNAS
This commit is contained in:
1 parent
c5508b727a
commit
64e8299aeb
27 files changed
+536
-16
No files matched your search
@@ -0,0 +1,54 @@
|
||||
name: Verify and publish checkpoint container
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, 'codex/**']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: dune-checkpoint-container
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
container:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Build and run offline checks
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
tags: dune:verify
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Verify isolated storage and HTTP behavior
|
||||
run: node tools/verify-container.mjs dune:verify
|
||||
- uses: docker/login-action@v3
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Publish the verified image
|
||||
if: github.ref == 'refs/heads/main'
|
||||
env:
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
REVISION: ${{ github.sha }}
|
||||
run: |
|
||||
image="ghcr.io/${REPOSITORY,,}"
|
||||
docker tag dune:verify "$image:sha-$REVISION"
|
||||
docker tag dune:verify "$image:checkpoint"
|
||||
docker push "$image:sha-$REVISION"
|
||||
docker push "$image:checkpoint"
|
||||
Reference in new issue
Block a user