|
20 | 20 |
|
21 | 21 |
|
22 | 22 | jobs:
|
23 |
| - build-nginx: |
| 23 | + build: |
24 | 24 | runs-on: ubuntu-latest
|
25 | 25 | permissions:
|
26 | 26 | contents: read
|
|
46 | 46 | id: meta
|
47 | 47 | uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
|
48 | 48 | with:
|
49 |
| - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-nginx |
| 49 | + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
50 | 50 | tags: |
|
51 | 51 | type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
52 | 52 | type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
|
|
56 | 56 | id: build-and-push
|
57 | 57 | uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
58 | 58 | with:
|
59 |
| - file: docker/production/Dockerfile.nginx |
60 |
| - context: . |
61 |
| - push: ${{ github.event_name != 'pull_request' }} |
62 |
| - tags: ${{ steps.meta.outputs.tags }} |
63 |
| - labels: ${{ steps.meta.outputs.labels }} |
64 |
| - cache-from: type=gha |
65 |
| - cache-to: type=gha,mode=max |
66 |
| - |
67 |
| - build-php-fpm: |
68 |
| - runs-on: ubuntu-latest |
69 |
| - permissions: |
70 |
| - contents: read |
71 |
| - packages: write |
72 |
| - id-token: write |
73 |
| - |
74 |
| - steps: |
75 |
| - - name: Checkout repository |
76 |
| - uses: actions/checkout@v3 |
77 |
| - |
78 |
| - - name: Set up Docker Buildx |
79 |
| - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 |
80 |
| - |
81 |
| - - name: Log into registry ${{ env.REGISTRY }} |
82 |
| - if: github.event_name != 'pull_request' |
83 |
| - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 |
84 |
| - with: |
85 |
| - registry: ${{ env.REGISTRY }} |
86 |
| - username: ${{ github.actor }} |
87 |
| - password: ${{ secrets.GITHUB_TOKEN }} |
88 |
| - |
89 |
| - - name: Extract Docker metadata |
90 |
| - id: meta |
91 |
| - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 |
92 |
| - with: |
93 |
| - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-php-fpm |
94 |
| - tags: | |
95 |
| - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} |
96 |
| - type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }} |
97 |
| - type=semver,pattern={{version}} |
98 |
| -
|
99 |
| - - name: Build and push Docker image |
100 |
| - id: build-and-push |
101 |
| - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 |
102 |
| - with: |
103 |
| - file: docker/production/Dockerfile.php-fpm |
| 59 | + file: docker/production/Dockerfile |
104 | 60 | context: .
|
105 | 61 | push: ${{ github.event_name != 'pull_request' }}
|
106 | 62 | tags: ${{ steps.meta.outputs.tags }}
|
|
0 commit comments