Skip to content

Prod Test

Prod Test #3

Workflow file for this run

name: Prod Test
on:
workflow_run:
workflows: ["Release Image"]
types: [completed]
jobs:
test:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Pull and tag production image
run: |
SHA=$(echo ${{ github.event.workflow_run.head_sha }} | cut -c1-7)
echo "Pulling production image with SHA: ${SHA}"
docker pull ghcr.io/${{ github.repository }}:${SHA}
docker tag ghcr.io/${{ github.repository }}:${SHA} copaw:latest
- name: Make test script executable
run: chmod +x ./scripts/test-startup.sh
- name: Run startup tests
run: ./scripts/test-startup.sh --ci
- name: Show logs on failure
if: failure()
run: docker compose logs --tail=200
- name: Cleanup
if: always()
run: docker compose down -v