Skip to content

Add identity-first Flex ingress and loop telemetry (#5) #13

Add identity-first Flex ingress and loop telemetry (#5)

Add identity-first Flex ingress and loop telemetry (#5) #13

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
packages: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
cache: pip
- run: python -m pip install -e ".[dev]"
- run: python -m ruff check .
- run: python -m mypy
- run: python -m pytest
- run: python -m cas_reference_product.evidence
docker:
runs-on: ubuntu-latest
needs: validate
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
platforms: linux/amd64
push: false
load: true
tags: cas-reference-product:ci
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Health-check smoke test
run: |
docker run -d --name cas-ci -p 8080:8080 \
-e ENVIRONMENT=local -e WORKFLOW_BACKEND=local \
cas-reference-product:ci
# Wait up to 30s for the app to become ready
for i in $(seq 1 15); do
if curl -sf http://localhost:8080/health/ready; then
echo "App is ready"; break
fi
sleep 2
done
curl -sf http://localhost:8080/health/live
curl -sf http://localhost:8080/health/ready
docker stop cas-ci
- name: Log in to GHCR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GHCR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
platforms: linux/amd64
push: true
tags: |
ghcr.io/coding-autopilot-system/cas-reference-product:latest
ghcr.io/coding-autopilot-system/cas-reference-product:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max