Skip to content

Modern Docker Management, Designed for Everyone

ci/cd: add agent preview workflow

Kyle Mendellf5e838dcb1f8
diff --git a/.github/workflows/build-1.0-agent-preview.yml b/.github/workflows/build-1.0-agent-preview.yml
new file mode 100644
index 000000000..0dca4b6d5
--- /dev/null
+++ b/.github/workflows/build-1.0-agent-preview.yml
@@ -0,0 +1,74 @@
+name: Build Agent 1.0 Preview
+
+on:
+ push:
+ branches:
+ - 1.0.0
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ prerelease:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
+ attestations: write
+
+ env:
+ DOCKER_IMAGE_NAME: ghcr.io/ofkm/arcane-headless
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v5
+ with:
+ fetch-depth: 1
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Lowercase image owner (safe-guard)
+ run: echo "DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME,,}" >> "$GITHUB_ENV"
+
+ - name: Login to GHCR
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Compute image tags
+ id: tags
+ run: |
+ SHORT_SHA="$(git rev-parse --short HEAD)"
+ echo "SHORT_SHA=${SHORT_SHA}" >> "$GITHUB_ENV"
+ echo "IMAGE_STABLE=${DOCKER_IMAGE_NAME}:1.0-preview" >> "$GITHUB_ENV"
+ echo "IMAGE_SHA=${DOCKER_IMAGE_NAME}:1.0-preview-${SHORT_SHA}" >> "$GITHUB_ENV"
+
+ - name: Build and push agent image
+ id: build-push
+ uses: docker/build-push-action@v6
+ with:
+ context: ./
+ file: docker/Dockerfile-agent
+ platforms: linux/amd64,linux/arm64
+ push: true
+ tags: |
+ ${{ env.IMAGE_STABLE }}
+ ${{ env.IMAGE_SHA }}
+ cache-from: type=gha,scope=agent-preview
+ cache-to: type=gha,scope=agent-preview,mode=max
+
+ - name: Container image attestation
+ uses: actions/attest-build-provenance@v2
+ with:
+ subject-name: '${{ env.DOCKER_IMAGE_NAME }}'
+ subject-digest: ${{ steps.build-push.outputs.digest }}
+ push-to-registry: true
diff --git a/.github/workflows/build-1.0-preview-image.yml b/.github/workflows/build-1.0-preview-image.yml
index 12446b21c..d09a68c11 100644
--- a/.github/workflows/build-1.0-preview-image.yml
+++ b/.github/workflows/build-1.0-preview-image.yml
@@ -74,6 +74,9 @@ jobs:
echo "SHORT_SHA=${SHORT_SHA}" >> "$GITHUB_ENV"
echo "IMAGE_STABLE=${DOCKER_IMAGE_NAME}:1.0-preview" >> "$GITHUB_ENV"
echo "IMAGE_SHA=${DOCKER_IMAGE_NAME}:1.0-preview-${SHORT_SHA}" >> "$GITHUB_ENV"
+ # Agent image tags (headless/agent preview)
+ echo "AGENT_IMAGE=ghcr.io/${{ github.repository_owner }}/arcane-headless:1.0-preview" >> "$GITHUB_ENV"
+ echo "AGENT_IMAGE_SHA=ghcr.io/${{ github.repository_owner }}/arcane-headless:1.0-preview-${SHORT_SHA}" >> "$GITHUB_ENV"
- name: Build and push Docker image
id: build-push
@@ -139,6 +142,11 @@ jobs:
Docker images:
- ${{ env.IMAGE_STABLE }}
- ${{ env.IMAGE_SHA }}
+
+ Agent images:
+ - ${{ env.AGENT_IMAGE }}
+ - ${{ env.AGENT_IMAGE_SHA }}
+
Digest:
- ${{ steps.build-push.outputs.digest }}