-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (51 loc) · 1.52 KB
/
docker_publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 }}