mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 07:43:16 +10:00
Tidy the docker setup and include a Github Action for publishing docker containers to DockerHub and Github Container Registry. Also add a small README file with docker hosting instructions.
41 lines
1017 B
YAML
41 lines
1017 B
YAML
name: Publish Docker
|
|
|
|
on:
|
|
push:
|
|
branches: ['release']
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GH_TOKEN }}
|
|
|
|
- name: Build the docker image
|
|
run: ./docker/build.sh
|
|
|
|
- name: Push the docker image to DockerHub
|
|
run: docker push --all-tags documenso/documenso
|
|
|
|
- name: Push the docker image to GitHub Container Registry
|
|
run: docker push --all-tags ghcr.io/documenso/documenso
|