Skip to content

Commit

Permalink
Create docker-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TowayWei authored Mar 29, 2024
1 parent 219866d commit a37752f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI to Docker

on:
push:
branches: [ master ]
paths:
- '**.c'
- '**.h'
- '**.sh'
- 'Dockerfile'
- '.github/workflows/*'

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

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

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

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/msd_lite:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7

0 comments on commit a37752f

Please sign in to comment.