mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-28 17:56:37 +02:00
👷 Prepare docker workflow for versioned releases
This commit is contained in:
parent
f0eabd82c3
commit
8465cfe6c2
1 changed files with 16 additions and 7 deletions
23
.github/workflows/docker-image.yml
vendored
23
.github/workflows/docker-image.yml
vendored
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Reference in a new issue