Skip to content

Commit 05fb2dc

Browse files
authored
Publish docker container
1 parent c8b2c60 commit 05fb2dc

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: docker
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
permissions: write-all
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Login to GitHub Container Registry
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Get version
28+
id: "discovery-version"
29+
shell: "bash"
30+
run: |
31+
echo PKG_VERSION="0.1.0" >> $GITHUB_OUTPUT
32+
33+
- name: Build image
34+
run: |
35+
docker build . -t ghcr.io/turmsapp/discovery:latest
36+
docker tag ghcr.io/turmsapp/discovery:latest ghcr.io/turmsapp/discovery:${{ steps.discovery-version.outputs.PKG_VERSION }}
37+
38+
- name: Publish images
39+
run: |
40+
docker push ghcr.io/turmsapp/discovery:latest
41+
docker push ghcr.io/turmsapp/discovery:${{ steps.discovery-version.outputs.PKG_VERSION }}

0 commit comments

Comments
 (0)