Skip to content

Commit e868838

Browse files
committed
build with Docker Cloud Build
1 parent a0fa328 commit e868838

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docker Cloud Build
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Log in to Docker Hub
16+
uses: docker/login-action@v3
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
with:
24+
version: "lab:latest"
25+
driver: cloud
26+
endpoint: "fontebasso/multiarch-builder"
27+
28+
- name: Extract release version
29+
id: version
30+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
31+
32+
- name: Build and push
33+
uses: docker/build-push-action@v6
34+
with:
35+
context: .
36+
tags: |
37+
fontebasso/php-nginx:${{ env.RELEASE_VERSION }}
38+
fontebasso/php-nginx:latest
39+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)