| 10 |
name: Publish Docker image |
name: Publish Docker image |
| 11 |
|
|
| 12 |
on: |
on: |
| 13 |
schedule: |
push: |
| 14 |
# Run every day 05:10 UTC+8 |
branches: [ "milestone" ] |
|
- cron: '10 21 * * *' |
|
| 15 |
|
|
| 16 |
env: |
env: |
| 17 |
|
DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 |
| 18 |
|
SOLR_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-solr |
| 19 |
APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache |
APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache |
| 20 |
PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php |
PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php |
| 21 |
BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd |
BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd |
| 45 |
username: ${{ secrets.DOCKERHUB_USERNAME }} |
username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 46 |
password: ${{ secrets.DOCKERHUB_TOKEN }} |
password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 47 |
|
|
| 48 |
- name: Extract metadata (tags, labels) for Docker |
- name: Set up QEMU |
| 49 |
id: meta |
uses: docker/setup-qemu-action@v3 |
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 |
|
|
with: |
|
|
images: leafok/lbbs |
|
| 50 |
|
|
| 51 |
- name: Build the Docker image (apache) |
- name: Set up Docker Buildx |
| 52 |
uses: docker/build-push-action@v5 |
uses: docker/setup-buildx-action@v3 |
|
with: |
|
|
context: ./leafok_bbs |
|
|
file: ./leafok_bbs/Dockerfile/dockerfile.apache |
|
|
tags: | |
|
|
${{ env.APACHE_IMAGE }}:latest |
|
| 53 |
|
|
| 54 |
- name: Build the Docker image (php) |
- name: Build the Docker image (solr) |
| 55 |
|
id: push-solr |
| 56 |
uses: docker/build-push-action@v5 |
uses: docker/build-push-action@v5 |
| 57 |
with: |
with: |
| 58 |
context: ./leafok_bbs |
platforms: ${{ env.DOCKERHUB_PLATFORMS }} |
| 59 |
file: ./leafok_bbs/Dockerfile/dockerfile.php |
context: . |
| 60 |
|
file: Dockerfile/dockerfile.solr.testing |
| 61 |
|
push: true |
| 62 |
tags: | |
tags: | |
| 63 |
${{ env.PHP_IMAGE }}:latest |
${{ env.SOLR_IMAGE }}:testing-${{ env.BUILD_DATE }} |
| 64 |
|
${{ env.SOLR_IMAGE }}:testing |
| 65 |
|
labels: ${{ steps.meta.outputs.labels }} |
| 66 |
|
|
| 67 |
- name: Build the Docker image (bbsd) |
- name: Build the Docker image (apache) |
|
uses: docker/build-push-action@v5 |
|
|
with: |
|
|
context: ./lbbs |
|
|
file: ./lbbs/Dockerfile/dockerfile.bbsd |
|
|
tags: | |
|
|
${{ env.BBSD_IMAGE }}:latest |
|
|
|
|
|
- name: Build the Docker image (apache:testing) |
|
| 68 |
id: push-apache |
id: push-apache |
| 69 |
uses: docker/build-push-action@v5 |
uses: docker/build-push-action@v5 |
| 70 |
with: |
with: |
| 71 |
|
platforms: ${{ env.DOCKERHUB_PLATFORMS }} |
| 72 |
context: . |
context: . |
| 73 |
file: Dockerfile/dockerfile.apache.testing |
file: Dockerfile/dockerfile.apache.testing |
| 74 |
push: true |
push: true |
| 77 |
${{ env.APACHE_IMAGE }}:testing |
${{ env.APACHE_IMAGE }}:testing |
| 78 |
labels: ${{ steps.meta.outputs.labels }} |
labels: ${{ steps.meta.outputs.labels }} |
| 79 |
|
|
| 80 |
- name: Build the Docker image (php:testing) |
- name: Build the Docker image (php) |
| 81 |
id: push-php |
id: push-php |
| 82 |
uses: docker/build-push-action@v5 |
uses: docker/build-push-action@v5 |
| 83 |
with: |
with: |
| 84 |
|
platforms: ${{ env.DOCKERHUB_PLATFORMS }} |
| 85 |
context: . |
context: . |
| 86 |
file: Dockerfile/dockerfile.php.testing |
file: Dockerfile/dockerfile.php.testing |
| 87 |
push: true |
push: true |
| 90 |
${{ env.PHP_IMAGE }}:testing |
${{ env.PHP_IMAGE }}:testing |
| 91 |
labels: ${{ steps.meta.outputs.labels }} |
labels: ${{ steps.meta.outputs.labels }} |
| 92 |
|
|
| 93 |
- name: Build the Docker image (bbsd:testing) |
- name: Build the Docker image (bbsd) |
| 94 |
id: push-bbsd |
id: push-bbsd |
| 95 |
uses: docker/build-push-action@v5 |
uses: docker/build-push-action@v5 |
| 96 |
with: |
with: |
| 97 |
|
platforms: ${{ env.DOCKERHUB_PLATFORMS }} |
| 98 |
context: . |
context: . |
| 99 |
file: Dockerfile/dockerfile.bbsd.testing |
file: Dockerfile/dockerfile.bbsd.testing |
| 100 |
push: true |
push: true |