Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

CI/CD: Automatically publish Docker image (#349)

Sam Ae34e1e9ebaac
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
new file mode 100644
index 000000000..34dbe7024
--- /dev/null
+++ b/.github/workflows/docker-image.yml
@@ -0,0 +1,28 @@
+name: Build and publish Docker image
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ publish:
+ name: Build and publish Docker image
+ runs-on: ubuntu-latest
+ steps:
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+
+ - name: Check out repository code
+ uses: actions/checkout@v3
+
+ - name: Build and publish image
+ uses: docker/build-push-action@v3
+ with:
+ push: true
+ tags: |
+ ${{ secrets.DOCKER_USERNAME }}/rallly:latest
+ ${{ secrets.DOCKER_USERNAME }}/rallly:${{ github.sha }}
diff --git a/docker-compose.yml b/docker-compose.yml
index 023dfcb34..ef866667c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,8 +15,7 @@ services:
retries: 5
rallly:
- build:
- context: .
+ image: lukevella/rallly:latest
restart: always
depends_on:
rallly_db: