Skip to content

v0.2.5

v0.2.5 #75

Workflow file for this run

name: Build Docker Image
on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types:
- published
workflow_dispatch:
jobs:
build:
name: "Build Image"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate Image Tags
id: generate-image-tags
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Login to Container Registry
if: contains(fromJSON('["release", "workflow_dispatch"]'), github.event_name)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ contains(fromJSON('["release", "workflow_dispatch"]'), github.event_name) }}
tags: ${{ steps.generate-image-tags.outputs.tags }}
labels: ${{ steps.generate-image-tags.outputs.labels }}