| 1 |
sysadm |
1.1 |
name: Docker Image CI
|
| 2 |
|
|
|
| 3 |
|
|
on:
|
| 4 |
|
|
push:
|
| 5 |
|
|
branches: [ "main" ]
|
| 6 |
|
|
pull_request:
|
| 7 |
|
|
branches: [ "main" ]
|
| 8 |
|
|
|
| 9 |
|
|
env:
|
| 10 |
|
|
APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache
|
| 11 |
|
|
PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php
|
| 12 |
|
|
BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd
|
| 13 |
|
|
|
| 14 |
|
|
jobs:
|
| 15 |
|
|
|
| 16 |
|
|
build:
|
| 17 |
|
|
|
| 18 |
|
|
runs-on: ubuntu-latest
|
| 19 |
|
|
|
| 20 |
|
|
steps:
|
| 21 |
|
|
- name: Checkout repository and submodules
|
| 22 |
|
|
uses: actions/checkout@v4
|
| 23 |
|
|
with:
|
| 24 |
|
|
submodules: recursive
|
| 25 |
|
|
fetch-depth: 0 # fetch all history if the action needs it
|
| 26 |
|
|
|
| 27 |
|
|
- name: Build the Docker image (apache)
|
| 28 |
|
|
uses: docker/build-push-action@v5
|
| 29 |
|
|
with:
|
| 30 |
|
|
context: ./leafok_bbs
|
| 31 |
|
|
file: ./leafok_bbs/Dockerfile/dockerfile.apache
|
| 32 |
|
|
tags: |
|
| 33 |
|
|
${{ env.APACHE_IMAGE }}:latest
|
| 34 |
|
|
|
| 35 |
|
|
- name: Build the Docker image (php)
|
| 36 |
|
|
uses: docker/build-push-action@v5
|
| 37 |
|
|
with:
|
| 38 |
|
|
context: ./leafok_bbs
|
| 39 |
|
|
file: ./leafok_bbs/Dockerfile/dockerfile.php
|
| 40 |
|
|
tags: |
|
| 41 |
|
|
${{ env.PHP_IMAGE }}:latest
|
| 42 |
|
|
|
| 43 |
|
|
- name: Build the Docker image (bbsd)
|
| 44 |
|
|
uses: docker/build-push-action@v5
|
| 45 |
|
|
with:
|
| 46 |
|
|
context: ./lbbs
|
| 47 |
|
|
file: ./lbbs/Dockerfile/dockerfile.bbsd
|
| 48 |
|
|
tags: |
|
| 49 |
|
|
${{ env.BBSD_IMAGE }}:latest
|
| 50 |
|
|
|
| 51 |
|
|
- name: Build the Docker image (apache:testing)
|
| 52 |
|
|
uses: docker/build-push-action@v5
|
| 53 |
|
|
with:
|
| 54 |
|
|
context: .
|
| 55 |
|
|
file: Dockerfile/dockerfile.apache.testing
|
| 56 |
|
|
tags: |
|
| 57 |
|
|
${{ env.APACHE_IMAGE }}:testing
|
| 58 |
|
|
|
| 59 |
|
|
- name: Build the Docker image (php:testing)
|
| 60 |
|
|
uses: docker/build-push-action@v5
|
| 61 |
|
|
with:
|
| 62 |
|
|
context: .
|
| 63 |
|
|
file: Dockerfile/dockerfile.php.testing
|
| 64 |
|
|
tags: |
|
| 65 |
|
|
${{ env.PHP_IMAGE }}:testing
|
| 66 |
|
|
|
| 67 |
|
|
- name: Build the Docker image (bbsd:testing)
|
| 68 |
|
|
uses: docker/build-push-action@v5
|
| 69 |
|
|
with:
|
| 70 |
|
|
context: .
|
| 71 |
|
|
file: Dockerfile/dockerfile.bbsd.testing
|
| 72 |
|
|
tags: |
|
| 73 |
|
|
${{ env.BBSD_IMAGE }}:testing
|