Skip to content

Commit d7ffd18

Browse files
committed
Adds docker versioning based on tag
1 parent 721aa0e commit d7ffd18

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: docker
2+
run-name: build images, deploy to ghcr
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'talkdai/dialog'
13+
environment: build
14+
defaults:
15+
run:
16+
shell: bash
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Login to GitHub Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.PKG_GITHUB_TOKEN }}
28+
29+
- name: ghcr.io/talkdai/dialog:${{ github.ref }}
30+
env:
31+
GITHUB_REF: ${{ github.ref }}
32+
run: |
33+
docker build -t ghcr.io/talkdai/dialog:${{ github.ref }} .
34+
docker push ghcr.io/talkdai/dialog:${{ github.ref }}

0 commit comments

Comments
 (0)