-
Notifications
You must be signed in to change notification settings - Fork 14
87 lines (76 loc) · 2.71 KB
/
gha-docker-solr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build and publish Solr Docker image
on:
workflow_dispatch:
inputs:
force:
default: false
required: false
type: boolean
description: "Push new image even when tests fail"
schedule:
- cron: "45 21 3 * *"
pull_request: ~
env:
IMAGE_NAME: ghcr.io/ibexa/core/solr
jobs:
build-and-publish:
runs-on: "ubuntu-20.04"
timeout-minutes: 30
permissions:
packages: write
services:
redis:
image: redis
ports:
- 6379:6379
options:
--memory=60m
solr:
image: ghcr.io/ibexa/core/solr
ports:
- 8983:8983
options: >-
--health-cmd "solr status"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: Add solr dependency
run: |
VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json)
composer require --no-update "ibexa/solr:$VERSION"
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
- name: Run integration test suite
run: composer test-integration-solr
continue-on-error: ${{ inputs.force != '' }}
env:
CUSTOM_CACHE_POOL: singleredis
CACHE_HOST: 127.0.0.1
CORES_SETUP: single
# - name: Build Solr image
# run: docker build -t "$IMAGE_NAME:latest" docker/solr
# - name: Start Solr image
# run: |
# docker run --health-cmd "solr status" \
# --health-interval 10s --health-timeout 5s --health-retries 10 \
# -d -p 8983:8983 "$IMAGE_NAME:latest"
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Debug
run: echo "I'm running!"
# - name: Push image
# run: docker push "$IMAGE_NAME"