Skip to content

Commit 01aa3c4

Browse files
authored
Merge pull request #150 from os2display/feature/DISPLAY-986_update_image_builds
DISPLAY-986: Update docker build and github workflows
2 parents 68c15ca + bc9aad4 commit 01aa3c4

18 files changed

+253
-144
lines changed

.github/workflows/docker_build_develop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
env:
1212
APP_VERSION: develop
13+
COMPOSER_ALLOW_SUPERUSER: 1
1314
steps:
1415
- name: Checkout
1516
uses: actions/checkout@v3
@@ -25,7 +26,7 @@ jobs:
2526
id: meta-api
2627
uses: docker/metadata-action@v4
2728
with:
28-
images: itkdev/os2display-api-service
29+
images: os2display/display-api-service
2930

3031
- name: Build and push (API)
3132
uses: docker/build-push-action@v4
@@ -43,7 +44,7 @@ jobs:
4344
id: meta-nginx
4445
uses: docker/metadata-action@v4
4546
with:
46-
images: itkdev/os2display-api-service-nginx
47+
images: os2display/display-api-service-nginx
4748

4849
- name: Build and push (Nginx)
4950
uses: docker/build-push-action@v4

.github/workflows/docker_build_tag.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ name: Build docker image (tag)
88
jobs:
99
docker:
1010
runs-on: ubuntu-latest
11+
env:
12+
COMPOSER_ALLOW_SUPERUSER: 1
1113
steps:
1214
- name: Checkout
1315
uses: actions/checkout@v3
@@ -23,7 +25,7 @@ jobs:
2325
id: meta-api
2426
uses: docker/metadata-action@v4
2527
with:
26-
images: itkdev/os2display-api-service
28+
images: os2display/display-api-service
2729

2830
- name: Build and push (API)
2931
uses: docker/build-push-action@v4
@@ -41,7 +43,7 @@ jobs:
4143
id: meta-nginx
4244
uses: docker/metadata-action@v4
4345
with:
44-
images: itkdev/os2display-api-service-nginx
46+
images: os2display/display-api-service-nginx
4547

4648
- name: Get the tag
4749
id: get_tag
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
tags:
4+
- '*.*.*'
5+
6+
name: Create Github Release
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
env:
15+
COMPOSER_ALLOW_SUPERUSER: 1
16+
APP_ENV: prod
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Composer install
22+
run: |
23+
docker network create frontend
24+
docker compose run --rm phpfpm composer install --no-dev -o --classmap-authoritative
25+
docker compose run --rm phpfpm composer clear-cache
26+
rm -rf infrastructure
27+
28+
- name: Make artefacts dir
29+
run: |
30+
mkdir -p ../assets
31+
32+
- name: Create archive
33+
run: |
34+
tar \
35+
-zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./*
36+
37+
- name: Create checksum
38+
run: sha256sum ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt
39+
40+
- name: Create a release in GitHub and uploads assets
41+
run: |
42+
gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
43+
env:
44+
GITHUB_TOKEN: ${{ github.TOKEN }}
45+
shell: bash

.github/workflows/php_upgrade.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
on: pull_request
2-
name: Upgrade
2+
name: PHP Upgrade Check
33
jobs:
44
test-composer-install:
55
runs-on: ubuntu-latest
6+
env:
7+
COMPOSER_ALLOW_SUPERUSER: 1
68
strategy:
79
fail-fast: false
810
matrix:
@@ -91,7 +93,7 @@ jobs:
9193
runs-on: ubuntu-latest
9294
services:
9395
mariadb:
94-
image: mariadb:latest
96+
image: mariadb:lts
9597
ports:
9698
- 3306
9799
env:

.github/workflows/pr.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
on: pull_request
2-
name: Review
2+
name: Pull Request Review
33
jobs:
44
test-composer-install:
55
runs-on: ubuntu-latest
6+
env:
7+
COMPOSER_ALLOW_SUPERUSER: 1
68
strategy:
79
fail-fast: false
810
matrix:
@@ -141,7 +143,7 @@ jobs:
141143
runs-on: ubuntu-latest
142144
services:
143145
mariadb:
144-
image: mariadb:latest
146+
image: mariadb:lts
145147
ports:
146148
- 3306
147149
env:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
6+
- Update docker build to publish to "os2display" org on docker hup. Update github workflow to latest actions.
67

78
- Updated `EventDatabaseApiFeedType` query ensuring started
89
but not finished events are found.

docker-compose.dev.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker-compose.redirect.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

docker-compose.server.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)