Skip to content

Commit ab9160b

Browse files
committed
chore: use ghcr
1 parent e93b9c6 commit ab9160b

4 files changed

Lines changed: 39 additions & 4 deletions

File tree

.github/workflows/build-latest.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ on:
88

99
env:
1010
REGISTRY_IMAGE: soulteary/sqlite-wordpress
11+
GHCR_IMAGE: ghcr.io/soulteary/sqlite-wordpress
1112

1213
jobs:
1314
docker:
1415
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
1519
steps:
1620
- name: Checkout
1721
uses: actions/checkout@v6
@@ -28,10 +32,19 @@ jobs:
2832
username: ${{ secrets.DOCKERHUB_USERNAME }}
2933
password: ${{ secrets.DOCKERHUB_TOKEN }}
3034

35+
- name: Login to GHCR
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ghcr.io
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
3142
- name: Build and push
3243
uses: docker/build-push-action@v6
3344
with:
3445
context: .
3546
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/arm/v5
3647
push: true
37-
tags: "${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}"
48+
tags: |
49+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
50+
${{ env.GHCR_IMAGE }}:${{ github.ref_name }}

.github/workflows/build-version.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ on:
88

99
env:
1010
REGISTRY_IMAGE: soulteary/sqlite-wordpress
11+
GHCR_IMAGE: ghcr.io/soulteary/sqlite-wordpress
1112

1213
jobs:
1314
docker:
1415
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
1519
steps:
1620
- name: Checkout
1721
uses: actions/checkout@v6
@@ -28,10 +32,19 @@ jobs:
2832
username: ${{ secrets.DOCKERHUB_USERNAME }}
2933
password: ${{ secrets.DOCKERHUB_TOKEN }}
3034

35+
- name: Login to GHCR
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ghcr.io
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
3142
- name: Build and push
3243
uses: docker/build-push-action@v6
3344
with:
3445
context: .
3546
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/arm/v5
3647
push: true
37-
tags: ${{ env.REGISTRY_IMAGE }}
48+
tags: |
49+
${{ env.REGISTRY_IMAGE }}
50+
${{ env.GHCR_IMAGE }}

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ WordPress with SQLite, ready to use out of the box.
66

77
- Based on [official image](https://hub.docker.com/_/wordpress), Easier and more sustainable solution.
88
- DockerHub Page: https://hub.docker.com/r/soulteary/sqlite-wordpress
9+
- GHCR Page: https://github.com/soulteary/docker-sqlite-wordpress/pkgs/container/sqlite-wordpress
910

1011
## Articles
1112

@@ -17,16 +18,22 @@ WordPress with SQLite, ready to use out of the box.
1718
You can download GitHub's clean and secure docker image using the following command:
1819

1920
```bash
20-
# use latest
21+
# Docker Hub: use latest
2122
docker pull soulteary/sqlite-wordpress
22-
# use specify version
23+
# Docker Hub: use specify version
2324
docker pull soulteary/sqlite-wordpress:6.9.1
25+
# GHCR: use latest
26+
docker pull ghcr.io/soulteary/sqlite-wordpress:latest
27+
# GHCR: use specify version
28+
docker pull ghcr.io/soulteary/sqlite-wordpress:6.9.1
2429
```
2530

2631
Use the following command to quickly launch the wordpress with port `8080`:
2732

2833
```bash
2934
docker run --rm -it -p 8080:80 -v `pwd`/wordpress:/var/www/html soulteary/sqlite-wordpress
35+
# or use GHCR
36+
docker run --rm -it -p 8080:80 -v `pwd`/wordpress:/var/www/html ghcr.io/soulteary/sqlite-wordpress:latest
3037
```
3138

3239
You can also use docker compose to start wordpress:
@@ -38,6 +45,7 @@ services:
3845

3946
wordpress:
4047
image: soulteary/sqlite-wordpress:6.9.1
48+
# or use: ghcr.io/soulteary/sqlite-wordpress:6.9.1
4149
restart: always
4250
ports:
4351
- 8080:80

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44

55
wordpress:
66
image: soulteary/sqlite-wordpress:6.9.1
7+
# or use: ghcr.io/soulteary/sqlite-wordpress:6.9.1
78
restart: always
89
ports:
910
- 8080:80

0 commit comments

Comments
 (0)