Skip to content

Commit e0e7001

Browse files
committed
ci: set up publishing docker image
1 parent 4831061 commit e0e7001

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
# Uncomment below to only run on tags (releases)
9+
# push:
10+
# tags: ["v*"]
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
jobs:
17+
docker:
18+
name: Build and Push Docker Image
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
24+
- name: Login to GitHub Container Registry
25+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
33+
with:
34+
context: .
35+
push: true
36+
tags: ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)