diff --git a/.github/workflows/build-standalone-docker-image.yml b/.github/workflows/build-standalone-docker-image.yml new file mode 100644 index 00000000..68d88498 --- /dev/null +++ b/.github/workflows/build-standalone-docker-image.yml @@ -0,0 +1,30 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + run: echo '${{ secrets.DOCKER_HUB_PASS }}' | docker login -u djangohelpdesk --password-stdin + + - name: Build Docker image + run: cd standalone ; docker build -t djangohelpdesk/standalone:latest .. + + - name: Push Docker image + run: docker push djangohelpdesk/standalone:latest + + - name: Tag and push Docker image with year, month and Git SHA + run: docker tag djangohelpdesk/standalone:latest djangohelpdesk/standalone:$(date +%Y-%m)-$(git rev-parse --short HEAD) ; docker push djangohelpdesk/standalone:$(date +%Y-%m)-$(git rev-parse --short HEAD) + + - name: If we are at a tag, add a tag to the current docker image push the image with the tag + if: startsWith(github.ref, 'refs/tags/') + run: docker tag djangohelpdesk/standalone:latest djangohelpdesk/standalone:${{ github.ref }} ; docker push djangohelpdesk/standalone:${{ github.ref }} diff --git a/docs/standalone.rst b/docs/standalone.rst index 3d1e14b8..85ab6fbd 100644 --- a/docs/standalone.rst +++ b/docs/standalone.rst @@ -1,7 +1,9 @@ Django-Helpdesk Standalone Installation ======================================= -Installation +You can find standalone docker images at `djangohelpdesk/standalone:latest `_. + +Installation using docker-compose ------------ 1. Clone the django-helpdesk repository: