Wave/.github/workflows/docker.yml
Mia Rose Winter 09803905ed
updated docker action (fixed typo)
Signed-off-by: Mia Winter <mia@miawinter.de>
2024-02-23 12:39:28 +01:00

55 lines
1.5 KiB
YAML

name: Build, Tag, Push Docker Image
on:
push:
tags: [ v*, alpha-*, beta-* ]
env:
IMAGE_NAME: miawinter/wave
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract metadata for the image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
flavor: |
latest=rtue
labels: |
maintainer=Mia Rose Winter
org.opencontainers.image.title=Wave
org.opencontainers.image.url=https://github.com/miawinter98/wave
org.opencontainers.image.source=https://github.com/miawinter98/wave
org.opencontainers.image.description=The Collaborative Open Source Blogging Engine
org.opencontainers.image.vendor=Winter Software
org.opencontainers.image.licenses=MIT
- name: Log into the Container registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: Wave/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}