Wave/.github/workflows/docker.yml

45 lines
1,021 B
YAML
Raw Normal View History

2024-02-19 19:31:53 +00:00
name: Build, Tag, Push Docker Image
on:
push:
2024-02-19 20:17:53 +00:00
tags: [ v*, alpha-*, beta-* ]
2024-02-19 19:31:53 +00:00
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 }}
2024-02-19 20:00:45 +00:00
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=tag
2024-02-19 19:31:53 +00:00
- name: Log into the Container registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2024-02-19 19:42:16 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2024-02-19 19:31:53 +00:00
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
2024-02-19 19:39:50 +00:00
file: Wave/Dockerfile
2024-02-19 19:31:53 +00:00
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}