Skip to content

build images, deploy to ghcr #12

build images, deploy to ghcr

build images, deploy to ghcr #12

name: docker-versioning
run-name: build images, deploy to ghcr
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'talkdai/dialog'
environment: build
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PKG_GITHUB_TOKEN }}
- name: ghcr.io/talkdai/dialog:${{ github.ref_name }}
env:
GITHUB_REF: ${{ github.ref_name }}
run: |
docker build -t ghcr.io/talkdai/dialog:${{ github.ref_name }} .
docker push ghcr.io/talkdai/dialog:${{ github.ref_name }}