50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Build and publish on dockerhub
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Maximize build space
|
|
uses: easimon/maximize-build-space@master
|
|
with:
|
|
root-reserve-mb: 512
|
|
swap-size-mb: 1024
|
|
remove-dotnet: 'true'
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
# list of Docker images to use as base name for tags
|
|
images: |
|
|
${{ secrets.DOCKERHUB_USERNAME }}/rocm-wyoming-whisper
|
|
# generate Docker tags based on the following events/attributes
|
|
tags: |
|
|
type=raw,value={{date 'YYYY-MM-DD-HH.mm' tz='Europe/Rome'}}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
#cache-from: type=gha
|
|
#cache-to: type=gha,mode=max
|
|
|