Skip to content

Merge pull request #3026 from Uninett/ruff/add-unused-imports-rule #1810

Merge pull request #3026 from Uninett/ruff/add-unused-imports-rule

Merge pull request #3026 from Uninett/ruff/add-unused-imports-rule #1810

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@v4
- name: docker compose build
run: |
echo "UID=$(id -u)" >> .env
echo "GID=$(id -g)" >> .env
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/slack-github-action@v2.0.0
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 }}"
}
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger