Files

57 lines
1.5 KiB
YAML

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 container
uses: docker/build-push-action@v6
with:
context: .
build-args: |
BUILD_REVISION=${{ github.sha }}
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"