Skip to content

Build docker-compose dev environment #257

Build docker-compose dev environment

Build docker-compose dev environment #257

Workflow file for this run

name: Build docker-compose dev environment
on:
schedule:
- cron: '6 6 * * *'
push:
pull_request:
jobs:
build-docker-compose:
name: "Build docker-compose-based development environment"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: docker-compose build
run: |
docker-compose build
- name: Verify containers stay running at least 1 minute
run: |
docker-compose up -d
sleep 60
docker-compose ps
echo "Verifying service states"
docker-compose ps -q | xargs docker inspect -f '{{.State.Running}}' | grep -q false && exit 1
echo "Looks ok"
- name: Print docker-compose logs
if: failure()
run: |
docker-compose logs
- name: Send GitHub Action trigger data to Slack workflow
id: slack
if: failure()
uses: slackapi/[email protected]
with:
payload: |
{
"title": "Building NAV's Docker Compose dev environment failed",
"github_ref_name": "${{ github.ref_name }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}