Build and publish Docker image #465
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish Docker image | |
on: | |
workflow_dispatch: | |
inputs: | |
service: | |
description: "Choose which service to build" | |
required: true | |
type: choice | |
options: | |
- sv-emitter | |
- sv-consumer | |
- fuel-streams-ws | |
- all | |
default: "all" | |
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 | |
strategy: | |
matrix: | |
package: | |
- name: sv-emitter | |
image: cluster/docker/fuel-core.Dockerfile | |
- name: sv-consumer | |
image: cluster/docker/sv-consumer.Dockerfile | |
- name: fuel-streams-ws | |
image: cluster/docker/fuel-streams-ws.Dockerfile | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build and push Docker for ${{ matrix.package.name }} | |
uses: ./.github/actions/docker-publish | |
if: github.event_name != 'workflow_dispatch' || github.event.inputs.service == 'all' || github.event.inputs.service | |
== matrix.package.name | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
image: ghcr.io/fuellabs/${{ matrix.package.name }} | |
dockerfile: ${{ matrix.package.image }} | |
build-args: |- | |
PACKAGE_NAME=${{ matrix.package.name }} |