Skip to content

Commit df91083

Browse files
Update bump-dependencies (#4)
* Update bump-dependencies * Add basic CI test --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Joe Corall <jjc223@lehigh.edu>
1 parent 9c2044c commit df91083

5 files changed

Lines changed: 62 additions & 8 deletions

File tree

.github/workflows/lint-test-build-push.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
1313

14-
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
14+
- 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]
@@ -22,4 +24,3 @@ jobs:
2224
contents: read
2325
packages: write
2426
secrets: inherit
25-

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM islandora/nginx:6.0.1@sha256:20d8b36e812c60bfabccdbfbee0f40d46733df921a4ea9de0a2fa943f88f4fb5
1+
FROM islandora/nginx:6.0.4@sha256:b6511d412d3b249c4091c2e586912db1305fbe4e3536316fb6c19e1f86766de1
22

33
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
44

@@ -14,9 +14,9 @@ ARG \
1414
# renovate: datasource=repology depName=alpine_3_22/npm
1515
NPM_VERSION=11.3.0-r1 \
1616
# renovate: datasource=github-tags depName=ojs packageName=pkp/ojs
17-
OJS_VERSION=3_5_0-1 \
17+
OJS_VERSION=3_5_0rc2 \
1818
# renovate: datasource=repology depName=alpine_3_22/php83
19-
PHP_VERSION=8.3.26-r0 \
19+
PHP_VERSION=8.3.27-r0 \
2020
# renovate: datasource=repology depName=alpine_3_22/poppler-utils
2121
POPPLER_VERSION=25.04.0-r0
2222

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ secrets:
2121

2222
services:
2323
init:
24-
image: islandora/base:6.0.1@sha256:34c281449a339dbce75f784da7dca237a3325022868d89ab5cf6d6d8e0ca24a1
24+
image: islandora/base:6.0.4@sha256:71a42ef7d1676e50a5860ac44fdde705fd0b38af0a7006c9d3371b8d88d0e311
2525
restart: no
2626
volumes:
2727
- ./secrets:/secrets:rw
@@ -53,7 +53,7 @@ services:
5353
mariadb:
5454
condition: service_started
5555
mariadb:
56-
image: islandora/mariadb:6.0.1@sha256:335df4225634f14095b337847e541d65b5abfa2fe051c7e2b93fae447cac1e58
56+
image: islandora/mariadb:6.0.4@sha256:0394daa3f0d99d8dde5c273da4f55b340b76fc729dfdc8b8466155ecc486235a
5757
volumes:
5858
- mariadb-data:/var/lib/mysql:rw
5959
secrets:

scripts/test.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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

0 commit comments

Comments
 (0)