Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish to GitHub Container Registry | |
on: | |
push: | |
branches: | |
- docker # Trigger the workflow when changes are pushed to the main branch. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: Log in to GitHub Container Registry | |
- name: Log in to GitHub Container Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
# Step 3: Build the Docker image | |
- name: Build Docker image | |
run: docker build -t ghcr.io/softcatala/whisper-ctranslate2:latest . | |
# Step 4: Push the Docker image to GitHub Container Registry | |
- name: Push Docker image | |
run: docker push ghcr.io/softcatala/whisper-ctranslate2:latest | |