Skip to content

feat: Support merging OCR'ed texts #32

feat: Support merging OCR'ed texts

feat: Support merging OCR'ed texts #32

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: write
packages: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run tests
run: go test -race -v ./...
release-please:
needs: test
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: simple
build-and-push:
needs: [release-please, test]
if: needs.release-please.outputs.release_created == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (release)
if: needs.release-please.outputs.release_created == 'true'
id: meta-release
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ needs.release-please.outputs.tag_name }}
type=semver,pattern={{version}},value=${{ needs.release-please.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release-please.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release-please.outputs.tag_name }}
type=sha
- name: Extract metadata (unstable)
if: needs.release-please.outputs.release_created != 'true'
id: meta-unstable
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=unstable
type=sha
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta-release.outputs.tags || steps.meta-unstable.outputs.tags }}
labels: ${{ steps.meta-release.outputs.labels || steps.meta-unstable.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max