/[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.6 - (show annotations)
Sat Jan 24 15:27:48 2026 UTC (7 weeks, 3 days ago) by sysadm
Branch: MAIN
Changes since 1.5: +44 -4 lines
Content type: application/yaml
Prevent concurrent 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 push:
14 branches: [ "milestone" ]
15
16 concurrency:
17 group: ${{ github.workflow }}-${{ github.ref }}
18 cancel-in-progress: true
19
20 env:
21 DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64
22 SOLR_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-solr
23 APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache
24 PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php
25 BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd
26
27 jobs:
28 push_to_registry:
29 name: Push Docker image to Docker Hub
30 runs-on: ubuntu-latest
31 permissions:
32 packages: write
33 contents: read
34 attestations: write
35 id-token: write
36 steps:
37 - name: Set current date as env variable
38 run: echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
39
40 - name: Checkout repository and submodules
41 uses: actions/checkout@v4
42 with:
43 submodules: recursive
44 fetch-depth: 0 # fetch all history if the action needs it
45
46 - name: Log in to Docker Hub
47 uses: docker/login-action@v3
48 with:
49 username: ${{ secrets.DOCKERHUB_USERNAME }}
50 password: ${{ secrets.DOCKERHUB_TOKEN }}
51
52 - name: Set up QEMU
53 uses: docker/setup-qemu-action@v3
54
55 - name: Set up Docker Buildx
56 uses: docker/setup-buildx-action@v3
57
58 - name: Extract Docker metadata (solr)
59 id: meta-solr
60 uses: docker/metadata-action@v5
61 with:
62 images: ${{ env.APACHE_IMAGE }}
63
64 - name: Extract Docker metadata (apache)
65 id: meta-apache
66 uses: docker/metadata-action@v5
67 with:
68 images: ${{ env.APACHE_IMAGE }}
69
70 - name: Extract Docker metadata (php)
71 id: meta-php
72 uses: docker/metadata-action@v5
73 with:
74 images: ${{ env.PHP_IMAGE }}
75
76 - name: Extract Docker metadata (bbsd)
77 id: meta-bbsd
78 uses: docker/metadata-action@v5
79 with:
80 images: ${{ env.PHP_IMAGE }}
81
82 - name: Build the Docker image (solr)
83 id: push-solr
84 uses: docker/build-push-action@v5
85 with:
86 platforms: ${{ env.DOCKERHUB_PLATFORMS }}
87 context: .
88 file: Dockerfile/dockerfile.solr.testing
89 push: true
90 tags: |
91 ${{ env.SOLR_IMAGE }}:testing-${{ env.BUILD_DATE }}
92 ${{ env.SOLR_IMAGE }}:testing
93 ${{ steps.meta-solr.outputs.tags }}
94 labels: ${{ steps.meta-solr.outputs.labels }}
95 cache-from: type=gha # Pull cache from GitHub Actions cache
96 cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
97
98 - name: Build the Docker image (apache)
99 id: push-apache
100 uses: docker/build-push-action@v5
101 with:
102 platforms: ${{ env.DOCKERHUB_PLATFORMS }}
103 context: .
104 file: Dockerfile/dockerfile.apache.testing
105 push: true
106 tags: |
107 ${{ env.APACHE_IMAGE }}:testing-${{ env.BUILD_DATE }}
108 ${{ env.APACHE_IMAGE }}:testing
109 ${{ steps.meta-apache.outputs.tags }}
110 labels: ${{ steps.meta-apache.outputs.labels }}
111 cache-from: type=gha # Pull cache from GitHub Actions cache
112 cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
113
114 - name: Build the Docker image (php)
115 id: push-php
116 uses: docker/build-push-action@v5
117 with:
118 platforms: ${{ env.DOCKERHUB_PLATFORMS }}
119 context: .
120 file: Dockerfile/dockerfile.php.testing
121 push: true
122 tags: |
123 ${{ env.PHP_IMAGE }}:testing-${{ env.BUILD_DATE }}
124 ${{ env.PHP_IMAGE }}:testing
125 ${{ steps.meta-php.outputs.tags }}
126 labels: ${{ steps.meta-php.outputs.labels }}
127 cache-from: type=gha # Pull cache from GitHub Actions cache
128 cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
129
130 - name: Build the Docker image (bbsd)
131 id: push-bbsd
132 uses: docker/build-push-action@v5
133 with:
134 platforms: ${{ env.DOCKERHUB_PLATFORMS }}
135 context: .
136 file: Dockerfile/dockerfile.bbsd.testing
137 push: true
138 tags: |
139 ${{ env.BBSD_IMAGE }}:testing-${{ env.BUILD_DATE }}
140 ${{ env.BBSD_IMAGE }}:testing
141 ${{ steps.meta-bbsd.outputs.tags }}
142 labels: ${{ steps.meta-bbsd.outputs.labels }}
143 cache-from: type=gha # Pull cache from GitHub Actions cache
144 cache-to: type=gha,mode=max # Push cache to GitHub Actions cache

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