Skip to content

Commit 72b23e4

Browse files
committed
chore: add github workflow for image push
1 parent f34bf13 commit 72b23e4

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- '*' # Triggers on version tags
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKER_USERNAME }}
20+
password: ${{ secrets.DOCKER_PASSWORD }}
21+
22+
- name: Build Docker image
23+
run: |
24+
docker build . -t augwit/wordpress:${{ github.ref }}
25+
26+
- name: Push Docker image
27+
run: |
28+
docker push augwit/wordpress:${{ github.ref }}

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The default port is 80. If you want to support HTTPS, please set the environment
1111
cert.pem chain.pem fullchain.pem options-ssl-nginx.conf privkey.pem README ssl ssl-dhparams.pem
1212
```
1313

14-
New features might come later. Feel free to visit the repository site on Github: [https://github.com/augwit/wordpress/](https://github.com/augwit/wordpress/)
14+
New features might come later.
1515

1616
## Usage
1717
Example of docker-compose, using this image and mysql image:
@@ -45,3 +45,11 @@ services:
4545
- ./mysql/data:/var/lib/mysql
4646
```
4747
48+
## Develop
49+
Feel free to visit the repository site on Github: [https://github.com/augwit/wordpress/](https://github.com/augwit/wordpress/)
50+
51+
Build:
52+
```
53+
docker build . -t augwit/wordpress:${tag}
54+
```
55+

0 commit comments

Comments
 (0)