Skip to content

Commit

Permalink
Create GitHub Actions workflow to build and push Docker Images
Browse files Browse the repository at this point in the history
  • Loading branch information
kabilar committed Dec 11, 2024
1 parent aa9421d commit b299daa
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Push Docker Images

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
docker:
runs-on: ubuntu-latest

strategy:
matrix:
image:
- name: base
dockerfile: ./images/Dockerfile
- name: matlab
dockerfile: ./images/Dockerfile.matlab
- name: gpu
dockerfile: ./images/Dockerfile
- name: gpu-matlab
dockerfile: ./images/Dockerfile
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Build and push Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: |
${{ vars.DOCKER_USERNAME }}/dandihub:latest-${{ matrix.name }}

0 comments on commit b299daa

Please sign in to comment.