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

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

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

Revision 1.1 by sysadm, Sat Jan 10 06:52:12 2026 UTC Revision 1.3 by sysadm, Sat Jan 24 15:27:16 2026 UTC
# Line 3  name: Docker Image CI Line 3  name: Docker Image CI
3  on:  on:
4    push:    push:
5      branches: [ "main" ]      branches: [ "main" ]
6    pull_request:  
7      branches: [ "main" ]  concurrency:
8      group: ${{ github.workflow }}-${{ github.ref }}
9      cancel-in-progress: true
10    
11  env:  env:
12    DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64    DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64
# Line 20  jobs: Line 22  jobs:
22      steps:      steps:
23      - uses: actions/checkout@v4      - uses: actions/checkout@v4
24    
25        - 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      - name: Set up QEMU      - name: Set up QEMU
32        uses: docker/setup-qemu-action@v3        uses: docker/setup-qemu-action@v3
33    
34      - name: Set up Docker Buildx      - name: Set up Docker Buildx
35        uses: docker/setup-buildx-action@v3        uses: docker/setup-buildx-action@v3
36    
37        - 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      - name: Build the Docker image (apache)      - name: Build the Docker image (apache)
50        id: build-apache        id: build-apache
51        uses: docker/build-push-action@v5        uses: docker/build-push-action@v5
# Line 34  jobs: Line 54  jobs:
54          context: .          context: .
55          file: Dockerfile/dockerfile.apache          file: Dockerfile/dockerfile.apache
56          tags: |          tags: |
57            ${{ env.APACHE_IMAGE }}:dev            ${{ steps.meta-apache.outputs.tags }}
58          labels: ${{ steps.meta.outputs.labels }}          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      - name: Build the Docker image (php)      - name: Build the Docker image (php)
63        id: build-php        id: build-php
64        uses: docker/build-push-action@v5        uses: docker/build-push-action@v5
# Line 45  jobs: Line 67  jobs:
67          context: .          context: .
68          file: Dockerfile/dockerfile.php          file: Dockerfile/dockerfile.php
69          tags: |          tags: |
70            ${{ env.APACHE_IMAGE }}:dev            ${{ steps.meta-php.outputs.tags }}
71          labels: ${{ steps.meta.outputs.labels }}          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            


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

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