Skip to content

Commit 394d02b

Browse files
authored
feat: Github action to build & push GHCR images (#16)
* Github action to build & push GHCR images * fix file path
1 parent 1c960d8 commit 394d02b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
persmissions:
10+
packages: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build the Docker image
19+
run: docker compose build
20+
- name: Login to GHCR
21+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
22+
- name: Push image to GHCR
23+
run: docker compose push

0 commit comments

Comments
 (0)