Skip to content

Fix issue #46

Fix issue #46 #56

Workflow file for this run

name: ghcr.io/opencyphal/texer container build and publish.
on:
release:
types: [ published ]
pull_request:
branches: [ "main" ]
env:
ORG_NAMESPACE: opencyphal
IMAGE_NAME: texer
IMAGE_VERSION_PREFIX: te
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: process event
id: process_event
uses: olegtarasov/[email protected]
with:
tagRegex: "(${{ env.IMAGE_VERSION_PREFIX }}).*"
- name: dryrun-build
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'release' && startsWith( steps.process_event.outputs.tag, env.IMAGE_VERSION_PREFIX ) && github.event.release.prerelease ) }}
run: docker build ./${{ env.IMAGE_NAME }}
- name: build-and-push
if: ${{ github.event_name == 'release' && startsWith( steps.process_event.outputs.tag, env.IMAGE_VERSION_PREFIX ) && !github.event.release.prerelease }}
uses: macbre/push-to-ghcr@master
with:
context: ./${{ env.IMAGE_NAME }}
dockerfile: ./${{ env.IMAGE_NAME }}/Dockerfile
image_name: ${{ env.ORG_NAMESPACE }}/${{ env.IMAGE_NAME }}
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: ghcr.io