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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sat Jan 10 06:52:12 2026 UTC (2 months ago) by sysadm
Branch: MAIN
Content type: application/yaml
Add config for Docker

1 sysadm 1.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     release:
14     types: [published]
15    
16     env:
17     DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64
18     APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache
19     PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php
20    
21     jobs:
22     push_to_registry:
23     name: Push Docker image to Docker Hub
24     runs-on: ubuntu-latest
25     permissions:
26     packages: write
27     contents: read
28     attestations: write
29     id-token: write
30     steps:
31     - name: Check out the repo
32     uses: actions/checkout@v5
33    
34     - name: Log in to Docker Hub
35     uses: docker/login-action@v3
36     with:
37     username: ${{ secrets.DOCKERHUB_USERNAME }}
38     password: ${{ secrets.DOCKERHUB_TOKEN }}
39    
40     - name: Set up QEMU
41     uses: docker/setup-qemu-action@v3
42    
43     - name: Set up Docker Buildx
44     uses: docker/setup-buildx-action@v3
45    
46     - name: Build and push Docker image (apache)
47     id: push-apache
48     uses: docker/build-push-action@v5
49     with:
50     platforms: ${{ env.DOCKERHUB_PLATFORMS }}
51     context: .
52     file: ./Dockerfile/dockerfile.apache
53     push: true
54     tags: |
55     ${{ env.APACHE_IMAGE }}:${{ github.ref_name }}
56     ${{ env.APACHE_IMAGE }}:latest
57     labels: ${{ steps.meta.outputs.labels }}
58    
59     - name: Build and push Docker image (php)
60     id: push-php
61     uses: docker/build-push-action@v5
62     with:
63     platforms: ${{ env.DOCKERHUB_PLATFORMS }}
64     context: .
65     file: ./Dockerfile/dockerfile.php
66     push: true
67     tags: |
68     ${{ env.PHP_IMAGE }}:${{ github.ref_name }}
69     ${{ env.PHP_IMAGE }}:latest
70     labels: ${{ steps.meta.outputs.labels }}

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