Clean images #11
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: 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: | |
- 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 | |
- name: Login to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
run: docker build -t ghcr.io/softcatala/whisper-ctranslate2:latest . | |
- name: Use Docker image | |
run: docker run -v "$(pwd)":/srv/files/ ghcr.io/softcatala/whisper-ctranslate2:latest /srv/files/e2e-tests/gossos.mp3 | |
# Step 5: Push the Docker image to GitHub Container Registry | |
- name: Push Docker image | |
run: docker push ghcr.io/softcatala/whisper-ctranslate2:latest | |