Skip to content

Commit 4f69cbb

Browse files
committed
CI: add workflow for publishing Docker image
1 parent d18f374 commit 4f69cbb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/publish-image.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Docker image to ghcr.io
2+
3+
permissions:
4+
packages: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
test:
13+
name: Publish image
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v4
18+
19+
- uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: kobzol
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- uses: docker/setup-buildx-action@v3
26+
- name: Build and push Docker image
27+
uses: docker/build-push-action@v5
28+
with:
29+
push: true
30+
tags: ghcr.io/kobzol/cargo-pgo:${{ github.ref_name }},ghcr.io/kobzol/cargo-pgo:latest

0 commit comments

Comments
 (0)