Files
Retrieval-based-Voice-Conve…/.github/workflows/docker-push.yml
2024-06-06 01:28:53 +03:00

40 lines
1021 B
YAML

name: Push Docker image to GitHub Container Registry
on:
push:
tags:
- '*'
jobs:
build-and-push:
runs-on: ubuntu-22.04
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