Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
DISPLAY=:1
HOST_DATA_PATH=./data

# Default base image avoids anonymous Docker Hub pull-rate limits.
BASE_IMAGE=public.ecr.aws/ubuntu/ubuntu:22.04

# These versions mirror the upstream event-driven Dockerfile as a starting point.
YCM_VERSION=v0.15.2
YARP_VERSION=v3.8.0
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Publish image to GHCR

on:
workflow_dispatch:
push:
branches:
- main
- master
tags:
- "v*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,prefix=sha-
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
44 changes: 44 additions & 0 deletions .github/workflows/test-image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test image build

on:
workflow_dispatch:
pull_request:

jobs:
build-and-smoke-test:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
load: true
tags: primi-iit-docker:test
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Smoke test installed tools
run: |
docker run --rm --entrypoint bash primi-iit-docker:test -lc '
set -euo pipefail
command -v yarp >/dev/null
command -v yarpmanager >/dev/null
command -v yarpview >/dev/null
command -v yarpscope >/dev/null
command -v yarpdataplayer >/dev/null
command -v vFramer >/dev/null
command -v start-yarpserver >/dev/null
command -v container-entrypoint >/dev/null
yarp check
'
Loading
Loading