Skip to content

Nightly Docker Compose Test #385

Nightly Docker Compose Test

Nightly Docker Compose Test #385

Workflow file for this run

name: Nightly Docker Compose Test
on:
schedule:
- cron: '0 2 * * *'
permissions:
contents: read
jobs:
compose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
- name: Test Docker Compose
run: |
docker compose up -d
docker compose ps
sleep 30
- name: Test Curl command
id: run_command
run: |
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" localhost:8080)
echo "Status code: $STATUS_CODE"
# Set the output for GitHub Actions
echo "::set-output name=status_code::$STATUS_CODE"
- name: Check command success
if: ${{ steps.run_command.outputs.status_code == '200' }}
run: echo "Command was successful (200)"
- name: Check command failure
if: ${{ steps.run_command.outputs.status_code != '200' }}
run: |
echo "Command failed with status code ${{ steps.run_command.outputs.status_code }}"
exit 1