Skip to content

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

👷 Prepare docker workflow for versioned releases

Luke Vella8465cfe6c287
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index 32451b7d3..578cb6fe9 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -1,8 +1,8 @@
name: Build and publish Docker image
on:
- workflow_dispatch:
- schedule:
- - cron: "0 6 * * 1" # Every Monday at 6:00am UTC
+ push:
+ tags:
+ - "v*"
jobs:
publish:
@@ -19,6 +19,16 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: |
+ ${{ secrets.DOCKER_NAMESPACE }}/rallly
+ tags: |
+ type=semver,pattern={{version}}
+ type=semver,pattern={{major}}.{{minor}}
+
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
@@ -26,12 +36,11 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and publish image
- uses: docker/build-push-action@v3
+ uses: docker/build-push-action@v4
with:
platforms: linux/arm64,linux/amd64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
- tags: |
- ${{ secrets.DOCKER_NAMESPACE }}/rallly:latest
- ${{ secrets.DOCKER_NAMESPACE }}/rallly:${{ github.sha }}
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}