Skip to content

Commit 7e26874

Browse files
authored
Create docker-push.yml
Add autopush docker images
1 parent 62d47bd commit 7e26874

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/docker-push.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker Build/Push
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php: ['8.2']
14+
unit: ['1.30.0']
15+
name: PHP ${{ matrix.php }} - Unit ${{ matrix.unit }}
16+
steps:
17+
-
18+
name: Checkout
19+
uses: actions/checkout@v3
20+
-
21+
name: Set up QEMU
22+
uses: docker/setup-qemu-action@v2
23+
-
24+
name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v2
26+
-
27+
name: Login to Docker Hub
28+
uses: docker/login-action@v2
29+
with:
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
32+
-
33+
name: Build and push
34+
uses: docker/build-push-action@v4
35+
with:
36+
context: .
37+
push: true
38+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/nginx-unit-php:${{ matrix.php }}-unit${{ matrix.unit }}

0 commit comments

Comments
 (0)