Files
Retrieval-based-Voice-Conve…/.github/workflows/docker-push.yml
T
2024-05-20 23:00:26 +03:00

40 lines
1.0 KiB
YAML

name: Push Docker image to GitHub Container Registry
on:
push:
tags:
- '*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets._GITHUB_PAT }}
- name: Git lowercase repository name
id: repository-lowercase
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
ghcr.io/${{ steps.repository-lowercase.outputs.lowercase }}:${{ github.ref_name }}
ghcr.io/${{ steps.repository-lowercase.outputs.lowercase }}:latest