File tree Expand file tree Collapse file tree 3 files changed +56
-2
lines changed
Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 1313
1414 - uses : hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
1515
16- - run : shellcheck **/*.sh
16+ - run : make lint
17+
18+ - run : make test
1719
1820 build-push :
1921 needs : [lint-test]
2224 contents : read
2325 packages : write
2426 secrets : inherit
25-
Original file line number Diff line number Diff line change 1+ .PHONY : build deps lint run test
2+
3+ DOCKER_IMAGE =ghcr.io/libops/ojs:main
4+
5+ deps :
6+ docker compose pull
7+
8+ build : deps
9+ docker compose build
10+
11+ lint :
12+ @docker compose config --format json| jq -e .services.ojs.image | grep libops
13+ @if command -v hadolint > /dev/null 2>&1 ; then \
14+ echo " Running hadolint on Dockerfiles..." ; \
15+ find . -name " Dockerfile" | xargs hadolint; \
16+ else \
17+ echo " hadolint not found, skipping Dockerfile validation" ; \
18+ fi
19+ @if command -v json5 > /dev/null 2>&1 ; then \
20+ echo " Running json5 validation on renovate.json5" ; \
21+ json5 --validate renovate.json5 > /dev/null; \
22+ else \
23+ echo " json5 not found, skipping renovate validation" ; \
24+ fi
25+
26+
27+ run : build
28+ docker compose up init
29+ docker compose up -d
30+
31+ test : run
32+ ./scripts/test.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -eou pipefail
4+
5+ max_attempts=10
6+ attempt=0
7+
8+ while [ $attempt -lt $max_attempts ]; do
9+ attempt=$(( attempt + 1 ))
10+ echo " Attempt $attempt of $max_attempts ..."
11+
12+ sleep 60
13+
14+ if curl -sf http://localhost | grep " <img" | grep -q " Open Journal Systems" ; then
15+ echo " OJS is up!"
16+ exit 0
17+ fi
18+ done
19+
20+ echo " Failed to detect OJS after $max_attempts attempts"
21+ exit 1
You can’t perform that action at this time.
0 commit comments