mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-05 01:06:44 +02:00
Add ci workflow for building standalone docker image
This commit is contained in:
parent
43a71e89f7
commit
92513f4f3e
30
.github/workflows/build-standalone-docker-image.yml
vendored
Normal file
30
.github/workflows/build-standalone-docker-image.yml
vendored
Normal file
@ -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 }}
|
@ -1,7 +1,9 @@
|
||||
Django-Helpdesk Standalone Installation
|
||||
=======================================
|
||||
|
||||
Installation
|
||||
You can find standalone docker images at `djangohelpdesk/standalone:latest <https://hub.docker.com/r/djangohelpdesk/standalone/tags>`_.
|
||||
|
||||
Installation using docker-compose
|
||||
------------
|
||||
|
||||
1. Clone the django-helpdesk repository:
|
||||
|
Loading…
x
Reference in New Issue
Block a user