Skip to content

Commit

Permalink
ci: Publish docker image with Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
rbermudezg authored and tobbee committed Nov 1, 2024
1 parent 405b7fb commit e8f66ae
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Docker image

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker image
run: |
repo_name=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker build -t ghcr.io/${repo_name}/livesim2:latest .
- name: Push Docker image to GitHub Container Registry
run: |
repo_name=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker push ghcr.io/${repo_name}/livesim2:latest

0 comments on commit e8f66ae

Please sign in to comment.