forked from tripal/tripal
-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (153 loc) · 6.81 KB
/
MAIN-buildDocker.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Build and Publish TripalDocker
on:
push:
branches:
- 4.x
- tv4g0-0-dockerBuilds
# Allows us to manually trigger this workflow.
# This is great if there is a change made to Tripal core that we want to test our modules on ASAP.
workflow_dispatch:
# Allows us to schedule when this workflow is run.
# This ensures we pick up any new changes in Drupal.
schedule:
# Run at 4am every night.
- cron: '0 4 * * *'
jobs:
push_to_registry:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
pgsql-version:
- "13"
- "14"
- "15"
- "16"
drupal-version:
- "10.2.x-dev"
- "10.3.x-dev"
- "10.4.x-dev"
# - "11.0.x-dev"
# - "11.x-dev"
# exclude:
# - php-version: "8.2"
# pgsql-version: "13"
# drupal-version: "11.0.x-dev"
# - php-version: "8.2"
# pgsql-version: "14"
# drupal-version: "11.0.x-dev"
# - php-version: "8.2"
# pgsql-version: "15"
# drupal-version: "11.0.x-dev"
# - php-version: "8.2"
# pgsql-version: "16"
# drupal-version: "11.0.x-dev"
# - php-version: "8.2"
# pgsql-version: "13"
# drupal-version: "11.x-dev"
# - php-version: "8.2"
# pgsql-version: "14"
# drupal-version: "11.x-dev"
# - php-version: "8.2"
# pgsql-version: "15"
# drupal-version: "11.x-dev"
# - php-version: "8.2"
# pgsql-version: "16"
# drupal-version: "11.x-dev"
# - php-version: "8.1"
# pgsql-version: "13"
# drupal-version: "11.0.x-dev"
# - php-version: "8.1"
# pgsql-version: "14"
# drupal-version: "11.0.x-dev"
# - php-version: "8.1"
# pgsql-version: "15"
# drupal-version: "11.0.x-dev"
# - php-version: "8.1"
# pgsql-version: "16"
# drupal-version: "11.0.x-dev"
# - php-version: "8.1"
# pgsql-version: "13"
# drupal-version: "11.x-dev"
# - php-version: "8.1"
# pgsql-version: "14"
# drupal-version: "11.x-dev"
# - php-version: "8.1"
# pgsql-version: "15"
# drupal-version: "11.x-dev"
# - php-version: "8.1"
# pgsql-version: "16"
# drupal-version: "11.x-dev"
# - php-version: "8.3"
# pgsql-version: "13"
# drupal-version: "11.0.x-dev"
# - php-version: "8.3"
# pgsql-version: "13"
# drupal-version: "11.x-dev"
# - php-version: "8.3"
# pgsql-version: "14"
# drupal-version: "11.0.x-dev"
# - php-version: "8.3"
# pgsql-version: "14"
# drupal-version: "11.x-dev"
# - php-version: "8.3"
# pgsql-version: "15"
# drupal-version: "11.0.x-dev"
# - php-version: "8.3"
# pgsql-version: "15"
# drupal-version: "11.x-dev"
name: drupal${{ matrix.drupal-version }}-php${{ matrix.php-version }}-pgsql${{ matrix.pgsql-version }}
steps:
- uses: actions/checkout@v4
name: Check out code
## Build images tagged drupal{VER}-php{VER}-pgsqlVER
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Full matrix of Docker images
with:
image: tripalproject/tripaldocker
tags: drupal${{ matrix.drupal-version }}-php${{ matrix.php-version }}-pgsql${{ matrix.pgsql-version }}
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupal-version }},postgresqlversion=${{ matrix.pgsql-version }},phpversion=${{ matrix.php-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.drupal-version }}",php.version.label="${{ matrix.php-version }}", postgresql.version.label="${{ matrix.pgsql-version }}"'
## Build images tagged drupal{VER}-php{VER}-pgsqlVER-noChado without chado installed!
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Full matrix of Docker images WITH NO CHADO
with:
image: tripalproject/tripaldocker
tags: drupal${{ matrix.drupal-version }}-php${{ matrix.php-version }}-pgsql${{ matrix.pgsql-version }}-noChado
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupal-version }},postgresqlversion=${{ matrix.pgsql-version }},phpversion=${{ matrix.php-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.drupal-version }}",php.version.label="${{ matrix.php-version }}", postgresql.version.label="${{ matrix.pgsql-version }}"'
## Build Images tagged drupal{VER} focused on php 8.2 + postgresql 16
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image Drupal focused Docker images.
if: ${{ matrix.php-version == '8.2' && matrix.pgsql-version == '16' }}
with:
image: tripalproject/tripaldocker
tags: drupal${{ matrix.drupal-version }}
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupal-version }},postgresqlversion=${{ matrix.pgsql-version }},phpversion=${{ matrix.php-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.drupal-version }}",php.version.label="${{ matrix.php-version }}", postgresql.version.label="${{ matrix.pgsql-version }}"'
## Build the image tagged as latest which is the highest version combo that we feel is well supported.
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build latest using 10.3.x-dev, PHP 8.3, PgSQL 16
if: ${{ matrix.drupal-version == '10.3.x-dev' && matrix.php-version == '8.3' && matrix.pgsql-version == '16' }}
with:
image: tripalproject/tripaldocker
tags: latest
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
buildArgs: "drupalversion=${{ matrix.drupal-version }},postgresqlversion=${{ matrix.pgsql-version }},phpversion=${{ matrix.php-version }}"
labels: 'tripal.branch=4.x,drupal.version.label="${{ matrix.drupal-version }}",php.version.label="${{ matrix.php-version }}", postgresql.version.label="${{ matrix.pgsql-version }}"'