40 lines
985 B
YAML
40 lines
985 B
YAML
name: Docker
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*.*.*"]
|
|
|
|
jobs:
|
|
build-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log into registry GitHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: DataHearth
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: ${{ github.repository_owner }}/${{ github.repository }}
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
- name: Build and push Docker image
|
|
id: build-and-push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|