Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit

Permalink
Add Docker image build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
juliavdkris committed Jul 9, 2024
1 parent 2d16608 commit 6b18e62
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker build & push image

on:
push:
branches: [main]
workflow_dispatch:


jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set lowercase repository owner environment variable (funky workaround because Docker is dumb)
run: |
echo "OWNER_LOWERCASE=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'

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

- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ env.OWNER_LOWERCASE }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ env.OWNER_LOWERCASE }}/graph:latest

0 comments on commit 6b18e62

Please sign in to comment.