Skip to content

Commit

Permalink
Github action to build and push Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed May 31, 2024
1 parent 82b45ee commit 9bdf94b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Push Docker image

on:
push:
branches:
- master

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.ACTION_USER }}
password: ${{ secrets.ACTION_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/modelbricks:${{ github.sha.substring(0, 7) }}

0 comments on commit 9bdf94b

Please sign in to comment.