mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-08 16:03:27 +00:00
* feat: sign release images with cosign and attach SBOM + SLSA provenance Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8mi68bMNUFwCge7xAqyky * fix: pin cosign-installer to exact version (no floating v4 tag exists) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8mi68bMNUFwCge7xAqyky * fix: embed SBOMs at build time via depot instead of rekor-bound cosign attest Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8mi68bMNUFwCge7xAqyky * docs: latest/main tags are only signed until the next main push Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8mi68bMNUFwCge7xAqyky * fix: gate signing on push events in cli/extra workflows, verify version tag Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8mi68bMNUFwCge7xAqyky * fix: refuse tag-targeted dispatches in publish workflows, use GITHUB_REF env Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8mi68bMNUFwCge7xAqyky --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
139 lines
3.9 KiB
YAML
139 lines
3.9 KiB
YAML
env:
|
|
REGISTRY: ghcr.io
|
|
ECR_REGISTRY: 976079455550.dkr.ecr.us-east-1.amazonaws.com
|
|
IMAGE_NAME: ${{ github.repository }}-extra
|
|
|
|
name: Publish windmill-extra
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
sleep:
|
|
runs-on: ubicloud
|
|
steps:
|
|
- name: Sleep for 900 seconds waiting for pypi to update index
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: sleep 900
|
|
shell: bash
|
|
|
|
# Build and test the image before publishing
|
|
test_extra:
|
|
needs: [sleep]
|
|
runs-on: ubicloud-standard-8
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build test image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/DockerfileExtra
|
|
load: true
|
|
tags: windmill-extra:test
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
- name: Start container
|
|
run: |
|
|
docker run -d --name windmill-extra-test \
|
|
-p 3001:3001 -p 3002:3002 -p 3003:3003 \
|
|
-e ENABLE_LSP=true \
|
|
-e ENABLE_MULTIPLAYER=true \
|
|
-e ENABLE_DEBUGGER=true \
|
|
-e DEBUGGER_PORT=3003 \
|
|
-e REQUIRE_SIGNED_DEBUG_REQUESTS=false \
|
|
windmill-extra:test
|
|
|
|
# Wait for container to start
|
|
echo "Waiting for container to initialize..."
|
|
sleep 10
|
|
|
|
# Show container logs for debugging
|
|
docker logs windmill-extra-test
|
|
|
|
- name: Run integration tests
|
|
run: |
|
|
bun run docker/test_windmill_extra.ts
|
|
|
|
- name: Show container logs on failure
|
|
if: failure()
|
|
run: |
|
|
echo "=== Container logs ==="
|
|
docker logs windmill-extra-test
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker stop windmill-extra-test || true
|
|
docker rm windmill-extra-test || true
|
|
|
|
publish_extra:
|
|
needs: [sleep, test_extra]
|
|
# a tag-targeted dispatch would republish the release tags unsigned,
|
|
# un-verifying the release; to republish a release, re-push its tag
|
|
if: github.event_name == 'push' || !startsWith(github.ref, 'refs/tags/')
|
|
runs-on: ubicloud-standard-8
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: depot/setup-action@v1
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=pr
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push publicly
|
|
id: docker_build
|
|
uses: depot/build-push-action@v1
|
|
with:
|
|
context: .
|
|
file: ./docker/DockerfileExtra
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
sbom: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' }}
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
|
${{ steps.meta.outputs.tags }}
|
|
labels: |
|
|
${{ steps.meta.outputs.labels }}
|
|
org.opencontainers.image.licenses=AGPLv3
|
|
|
|
- name: Sign and attest release image
|
|
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
|
|
uses: ./.github/actions/sign-attest-image
|
|
with:
|
|
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
digest: ${{ steps.docker_build.outputs.digest }}
|