Skip to content

Commit 0a6d5bb

Browse files
committed
adds workflow to publish container image
1 parent 2295629 commit 0a6d5bb

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Patch Hunter
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
tags: [ 'v*' ]
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log in to GitHub Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and push multi-arch image
30+
uses: docker/build-push-action@v6
31+
with:
32+
context: .
33+
push: true
34+
platforms: linux/amd64,linux/arm64
35+
tags: |
36+
ghcr.io/${{ github.repository_owner }}/patch-hunter:latest
37+
ghcr.io/${{ github.repository_owner }}/patch-hunter:${{ github.ref_name }}
38+

0 commit comments

Comments
 (0)