/[LeafOK_CVS]/lbbs-combo/.github/workflows/docker-publish.yml
ViewVC logotype

Diff of /lbbs-combo/.github/workflows/docker-publish.yml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Thu Jan 8 15:13:46 2026 UTC Revision 1.8 by sysadm, Sun Jan 25 00:53:00 2026 UTC
# Line 10  Line 10 
10  name: Publish Docker image  name: Publish Docker image
11    
12  on:  on:
13    schedule:    push:
14      # Run every day 05:10 UTC+8      tags:
15      - cron: '10 21 * * *'        - 'combo-*'
16    
17    concurrency:
18      group: ${{ github.workflow }}-${{ github.ref }}
19      cancel-in-progress: true
20    
21  env:  env:
22      DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64
23      SOLR_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-solr
24    APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache    APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache
25    PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php    PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php
26    BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd    BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd
# Line 29  jobs: Line 35  jobs:
35        attestations: write        attestations: write
36        id-token: write        id-token: write
37      steps:      steps:
       - name: Set current date as env variable  
         run: echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV  
   
38        - name: Checkout repository and submodules        - name: Checkout repository and submodules
39          uses: actions/checkout@v4          uses: actions/checkout@v4
40          with:          with:
# Line 44  jobs: Line 47  jobs:
47            username: ${{ secrets.DOCKERHUB_USERNAME }}            username: ${{ secrets.DOCKERHUB_USERNAME }}
48            password: ${{ secrets.DOCKERHUB_TOKEN }}            password: ${{ secrets.DOCKERHUB_TOKEN }}
49    
50        - name: Extract metadata (tags, labels) for Docker        - name: Set up QEMU
51          id: meta          uses: docker/setup-qemu-action@v3
52          uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7  
53          - name: Set up Docker Buildx
54            uses: docker/setup-buildx-action@v3
55    
56          - name: Extract Docker metadata (solr)
57            id: meta-solr
58            uses: docker/metadata-action@v5
59          with:          with:
60            images: leafok/lbbs            images: ${{ env.SOLR_IMAGE }}
61    
62        - name: Build the Docker image (apache)        - name: Extract Docker metadata (apache)
63          uses: docker/build-push-action@v5          id: meta-apache
64            uses: docker/metadata-action@v5
65          with:          with:
66            context: ./leafok_bbs            images: ${{ env.APACHE_IMAGE }}
           file: ./leafok_bbs/Dockerfile/dockerfile.apache  
           tags: |  
             ${{ env.APACHE_IMAGE }}:latest  
67    
68        - name: Build the Docker image (php)        - name: Extract Docker metadata (php)
69          uses: docker/build-push-action@v5          id: meta-php
70            uses: docker/metadata-action@v5
71          with:          with:
72            context: ./leafok_bbs            images: ${{ env.PHP_IMAGE }}
           file: ./leafok_bbs/Dockerfile/dockerfile.php  
           tags: |  
             ${{ env.PHP_IMAGE }}:latest  
73    
74        - name: Build the Docker image (bbsd)        - name: Extract Docker metadata (bbsd)
75            id: meta-bbsd
76            uses: docker/metadata-action@v5
77            with:
78              images: ${{ env.BBSD_IMAGE }}
79    
80          - name: Build the Docker image (solr)
81            id: push-solr
82          uses: docker/build-push-action@v5          uses: docker/build-push-action@v5
83          with:          with:
84            context: ./lbbs            platforms: ${{ env.DOCKERHUB_PLATFORMS }}
85            file: ./lbbs/Dockerfile/dockerfile.bbsd            context: .
86              file: Dockerfile/dockerfile.solr
87              push: true
88            tags: |            tags: |
89              ${{ env.BBSD_IMAGE }}:latest              ${{ env.SOLR_IMAGE }}:combo
90                                        ${{ steps.meta-solr.outputs.tags }}
91        - name: Build the Docker image (apache:testing)            labels: ${{ steps.meta-solr.outputs.labels }}
92              cache-from: type=gha # Pull cache from GitHub Actions cache
93              cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
94    
95          - name: Build the Docker image (apache)
96          id: push-apache          id: push-apache
97          uses: docker/build-push-action@v5          uses: docker/build-push-action@v5
98          with:          with:
99              platforms: ${{ env.DOCKERHUB_PLATFORMS }}
100            context: .            context: .
101            file: Dockerfile/dockerfile.apache.testing            file: Dockerfile/dockerfile.apache
102            push: true            push: true
103            tags: |            tags: |
104              ${{ env.APACHE_IMAGE }}:testing-${{ env.BUILD_DATE }}              ${{ env.APACHE_IMAGE }}:combo
105              ${{ env.APACHE_IMAGE }}:testing              ${{ steps.meta-apache.outputs.tags }}
106            labels: ${{ steps.meta.outputs.labels }}            labels: ${{ steps.meta-apache.outputs.labels }}
107              cache-from: type=gha # Pull cache from GitHub Actions cache
108              cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
109    
110        - name: Build the Docker image (php:testing)        - name: Build the Docker image (php)
111          id: push-php          id: push-php
112          uses: docker/build-push-action@v5          uses: docker/build-push-action@v5
113          with:          with:
114              platforms: ${{ env.DOCKERHUB_PLATFORMS }}
115            context: .            context: .
116            file: Dockerfile/dockerfile.php.testing            file: Dockerfile/dockerfile.php
117            push: true            push: true
118            tags: |            tags: |
119              ${{ env.PHP_IMAGE }}:testing-${{ env.BUILD_DATE }}              ${{ env.PHP_IMAGE }}:combo
120              ${{ env.PHP_IMAGE }}:testing              ${{ steps.meta-php.outputs.tags }}
121            labels: ${{ steps.meta.outputs.labels }}            labels: ${{ steps.meta-php.outputs.labels }}
122              cache-from: type=gha # Pull cache from GitHub Actions cache
123              cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
124    
125        - name: Build the Docker image (bbsd:testing)        - name: Build the Docker image (bbsd)
126          id: push-bbsd          id: push-bbsd
127          uses: docker/build-push-action@v5          uses: docker/build-push-action@v5
128          with:          with:
129              platforms: ${{ env.DOCKERHUB_PLATFORMS }}
130            context: .            context: .
131            file: Dockerfile/dockerfile.bbsd.testing            file: Dockerfile/dockerfile.bbsd
132            push: true            push: true
133            tags: |            tags: |
134              ${{ env.BBSD_IMAGE }}:testing-${{ env.BUILD_DATE }}              ${{ env.BBSD_IMAGE }}:combo
135              ${{ env.BBSD_IMAGE }}:testing              ${{ steps.meta-bbsd.outputs.tags }}
136            labels: ${{ steps.meta.outputs.labels }}            labels: ${{ steps.meta-bbsd.outputs.labels }}
137              cache-from: type=gha # Pull cache from GitHub Actions cache
138              cache-to: type=gha,mode=max # Push cache to GitHub Actions cache


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1