Skip to content

Commit

Permalink
Publish docker image to GHCR (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunu authored Oct 17, 2023
1 parent b0da463 commit df36149
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Docker Image, Push to GHCR

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
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@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./compose/django
push: true
tags: |
ghcr.io/willemarcel/osmcha-django:latest
ghcr.io/willemarcel/osmcha-django:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit df36149

Please sign in to comment.