/[LeafOK_CVS]/fenglin/.github/workflows/docker-image.yml
ViewVC logotype

Annotation of /fenglin/.github/workflows/docker-image.yml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Sat Jan 24 15:27:16 2026 UTC (7 weeks, 3 days ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +32 -5 lines
Content type: application/yaml
Prevent concurrent workflow

1 sysadm 1.1 name: Docker Image CI
2    
3     on:
4     push:
5     branches: [ "main" ]
6    
7 sysadm 1.3 concurrency:
8     group: ${{ github.workflow }}-${{ github.ref }}
9     cancel-in-progress: true
10    
11 sysadm 1.1 env:
12     DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64
13     APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache
14     PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php
15    
16     jobs:
17    
18     build:
19    
20     runs-on: ubuntu-latest
21    
22     steps:
23     - uses: actions/checkout@v4
24    
25 sysadm 1.3 - name: Log in to Docker Hub
26     uses: docker/login-action@v3
27     with:
28     username: ${{ secrets.DOCKERHUB_USERNAME }}
29     password: ${{ secrets.DOCKERHUB_TOKEN }}
30    
31 sysadm 1.1 - name: Set up QEMU
32     uses: docker/setup-qemu-action@v3
33    
34     - name: Set up Docker Buildx
35     uses: docker/setup-buildx-action@v3
36    
37 sysadm 1.3 - name: Extract Docker metadata (apache)
38     id: meta-apache
39     uses: docker/metadata-action@v5
40     with:
41     images: ${{ env.APACHE_IMAGE }}
42    
43     - name: Extract Docker metadata (php)
44     id: meta-php
45     uses: docker/metadata-action@v5
46     with:
47     images: ${{ env.PHP_IMAGE }}
48    
49 sysadm 1.1 - name: Build the Docker image (apache)
50     id: build-apache
51     uses: docker/build-push-action@v5
52     with:
53     platforms: ${{ env.DOCKERHUB_PLATFORMS }}
54     context: .
55     file: Dockerfile/dockerfile.apache
56     tags: |
57 sysadm 1.3 ${{ steps.meta-apache.outputs.tags }}
58     labels: ${{ steps.meta-apache.outputs.labels }}
59     cache-from: type=gha # Pull cache from GitHub Actions cache
60     cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
61    
62 sysadm 1.1 - name: Build the Docker image (php)
63     id: build-php
64     uses: docker/build-push-action@v5
65     with:
66     platforms: ${{ env.DOCKERHUB_PLATFORMS }}
67     context: .
68     file: Dockerfile/dockerfile.php
69     tags: |
70 sysadm 1.3 ${{ steps.meta-php.outputs.tags }}
71     labels: ${{ steps.meta-php.outputs.labels }}
72     cache-from: type=gha # Pull cache from GitHub Actions cache
73     cache-to: type=gha,mode=max # Push cache to GitHub Actions cache
74    

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