mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-20 19:37:09 +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
|
name: Build and publish Docker image
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
push:
|
||||||
schedule:
|
tags:
|
||||||
- cron: "0 6 * * 1" # Every Monday at 6:00am UTC
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
@ -19,6 +19,16 @@ jobs:
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
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
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -26,12 +36,11 @@ jobs:
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and publish image
|
- name: Build and publish image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
platforms: linux/arm64,linux/amd64
|
platforms: linux/arm64,linux/amd64
|
||||||
push: true
|
push: true
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
${{ secrets.DOCKER_NAMESPACE }}/rallly:latest
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
${{ secrets.DOCKER_NAMESPACE }}/rallly:${{ github.sha }}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue