Skip to content

V0.3.0 rc.1

V0.3.0 rc.1 #37

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Dockerhub
on:
workflow_dispatch:
push:
branches:
- 'master'
tags: ['v*.*.*']
pull_request:
#branches:
# - 'master'
workflow_call:
env:
REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}
jobs:
push:
#if: github.event_name == 'push' || (github.event_name == 'workflow_call' && github.event.inputs.trigger == 'build')
#if: github.event_name == 'push' || (github.event_name == 'workflow_call' && github.event.inputs.trigger == 'build')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Repository Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Extract Git Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
name: Build & Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event.inputs.trigger == 'push' }}
# push:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}