mirror of
https://github.com/BradGroux/veritas-kanban.git
synced 2026-08-28 02:44:59 +00:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Docker Image Contract
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: docker-image-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
contract:
|
|
name: Build, Size, and Runtime Contract
|
|
if: >-
|
|
github.event_name == 'workflow_dispatch' ||
|
|
contains(github.event.pull_request.labels.*.name, 'ci:full')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Record milestone selection
|
|
run: |
|
|
{
|
|
echo "### Docker image milestone"
|
|
echo
|
|
echo "- Trigger: \`$GITHUB_EVENT_NAME\`"
|
|
echo "- Reason: explicit \`ci:full\` or manual milestone"
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Build production image
|
|
run: docker build --target production --tag veritas-kanban:contract .
|
|
|
|
- name: Enforce image and runtime contract
|
|
run: node scripts/check-docker-image.mjs veritas-kanban:contract
|