Skip to content

build(repo): Fix run-publisher script #447

build(repo): Fix run-publisher script

build(repo): Fix run-publisher script #447

name: Build and publish Docker image
on:
workflow_dispatch:
push:
branches:
- main
release:
types:
- published
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
if: |
(github.event_name == 'release' && github.event.action == 'published') ||
github.ref == 'refs/heads/main' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Get short SHA
id: sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push Docker (${{ steps.sha.outputs.short_sha }})
uses: ./.github/actions/docker-publish
id: publish
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
image: ghcr.io/fuellabs/fuel-streams-publisher
dockerfile: cluster/docker/fuel-streams-publisher.Dockerfile