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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu Jan 8 15:13:46 2026 UTC (2 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.1: +9 -5 lines
Content type: application/yaml
Update workflow

1 # This workflow uses actions that are not certified by GitHub.
2 # They are provided by a third-party and are governed by
3 # separate terms of service, privacy policy, and support
4 # documentation.
5
6 # GitHub recommends pinning actions to a commit SHA.
7 # To get a newer version, you will need to update the SHA.
8 # You can also reference a tag or branch, but the action may change without warning.
9
10 name: Publish Docker image
11
12 on:
13 schedule:
14 # Run every day 05:10 UTC+8
15 - cron: '10 21 * * *'
16
17 env:
18 APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache
19 PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php
20 BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd
21
22 jobs:
23 push_to_registry:
24 name: Push Docker image to Docker Hub
25 runs-on: ubuntu-latest
26 permissions:
27 packages: write
28 contents: read
29 attestations: write
30 id-token: write
31 steps:
32 - name: Set current date as env variable
33 run: echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
34
35 - name: Checkout repository and submodules
36 uses: actions/checkout@v4
37 with:
38 submodules: recursive
39 fetch-depth: 0 # fetch all history if the action needs it
40
41 - name: Log in to Docker Hub
42 uses: docker/login-action@v3
43 with:
44 username: ${{ secrets.DOCKERHUB_USERNAME }}
45 password: ${{ secrets.DOCKERHUB_TOKEN }}
46
47 - name: Extract metadata (tags, labels) for Docker
48 id: meta
49 uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
50 with:
51 images: leafok/lbbs
52
53 - name: Build the Docker image (apache)
54 uses: docker/build-push-action@v5
55 with:
56 context: ./leafok_bbs
57 file: ./leafok_bbs/Dockerfile/dockerfile.apache
58 tags: |
59 ${{ env.APACHE_IMAGE }}:latest
60
61 - name: Build the Docker image (php)
62 uses: docker/build-push-action@v5
63 with:
64 context: ./leafok_bbs
65 file: ./leafok_bbs/Dockerfile/dockerfile.php
66 tags: |
67 ${{ env.PHP_IMAGE }}:latest
68
69 - name: Build the Docker image (bbsd)
70 uses: docker/build-push-action@v5
71 with:
72 context: ./lbbs
73 file: ./lbbs/Dockerfile/dockerfile.bbsd
74 tags: |
75 ${{ env.BBSD_IMAGE }}:latest
76
77 - name: Build the Docker image (apache:testing)
78 id: push-apache
79 uses: docker/build-push-action@v5
80 with:
81 context: .
82 file: Dockerfile/dockerfile.apache.testing
83 push: true
84 tags: |
85 ${{ env.APACHE_IMAGE }}:testing-${{ env.BUILD_DATE }}
86 ${{ env.APACHE_IMAGE }}:testing
87 labels: ${{ steps.meta.outputs.labels }}
88
89 - name: Build the Docker image (php:testing)
90 id: push-php
91 uses: docker/build-push-action@v5
92 with:
93 context: .
94 file: Dockerfile/dockerfile.php.testing
95 push: true
96 tags: |
97 ${{ env.PHP_IMAGE }}:testing-${{ env.BUILD_DATE }}
98 ${{ env.PHP_IMAGE }}:testing
99 labels: ${{ steps.meta.outputs.labels }}
100
101 - name: Build the Docker image (bbsd:testing)
102 id: push-bbsd
103 uses: docker/build-push-action@v5
104 with:
105 context: .
106 file: Dockerfile/dockerfile.bbsd.testing
107 push: true
108 tags: |
109 ${{ env.BBSD_IMAGE }}:testing-${{ env.BUILD_DATE }}
110 ${{ env.BBSD_IMAGE }}:testing
111 labels: ${{ steps.meta.outputs.labels }}

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