Skip to content

Commit

Permalink
add builds
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Dec 14, 2023
1 parent be922ec commit 37cbbb7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-build-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Docker Images

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
docker-build:
strategy:
matrix:
runner: [ubuntu-latest]
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive

- uses: depot/setup-action@v1

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

- uses: depot/build-push-action@v1
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}

0 comments on commit 37cbbb7

Please sign in to comment.