Skip to content

Commit 3a7d86c

Browse files
authored
Merge pull request #11 from gKits/master
ci: add pipelin to release image to ghcr.io
2 parents cbb7384 + 8c21628 commit 3a7d86c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy-to-ghcr.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push_to_registries:
9+
name: Push Docker image to multiple registries
10+
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
13+
contents: read
14+
steps:
15+
- name: Check out the repo
16+
uses: actions/checkout@v4
17+
18+
- name: Log in to the Container registry
19+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Extract metadata (tags, labels) for Docker
26+
id: meta
27+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
28+
with:
29+
images: |
30+
ghcr.io/${{ github.repository }}
31+
32+
- name: Build and push Docker images
33+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
34+
with:
35+
context: .
36+
push: true
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)