Skip to content

Commit 4a8f98b

Browse files
committed
Try and publish to ghcr.io
1 parent aca71c5 commit 4a8f98b

File tree

2 files changed

+32
-18
lines changed

2 files changed

+32
-18
lines changed

.github/workflows/docker-image.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Docker image to GHCR
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Log in to GitHub Container Registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Build Docker image
27+
run: |
28+
docker build -t ghcr.io/${{ github.repository }}:latest .
29+
30+
- name: Push Docker image
31+
run: |
32+
docker push ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)