Skip to content

Commit

Permalink
ci: add docker image build (#35)
Browse files Browse the repository at this point in the history
* ci: add docker image build

* tag slmix
  • Loading branch information
sreimers authored Jan 3, 2024
1 parent add5bb2 commit 7f6a294
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: docker

on:
push:
branches: [ main ]
paths:
- '*/Dockerfile'
- '.github/workflows/docker.yml'

env:
VERSION_SLMIX: v0.6.0

jobs:
docker:
env:
IMAGE_NAME: ${{ github.repository }}/slmix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log into registry
uses: docker/login-action@v3
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: |
docker build -t slmix
- name: Tag and Push image
if: github.event_name != 'pull_request'
run: |
docker tag slmix ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_SLMIX }}
docker tag slmix ghcr.io/${{ env.IMAGE_NAME }}:latest
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_SLMIX }}
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest

0 comments on commit 7f6a294

Please sign in to comment.