-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (32 loc) · 1.23 KB
/
build-push.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
name: Build and push
on: # yamllint disable-line rule:truthy
workflow_dispatch: # manual trigger
inputs:
node_tag:
description: 'Node tag'
required: true
node_image_tag:
description: 'Node image tag'
required: true
env:
user: bisgardo
node_image_repo: 'bisgardo/concordium-node'
node_dashboard_image_repo: 'bisgardo/concordium-node-dashboard'
node_tag: '${{ github.event.inputs.node_tag }}'
node_image_tag: '${{ github.event.inputs.node_image_tag }}'
node_dashboard_image_tag: 'node-${{ github.event.inputs.node_image_tag }}'
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
run: docker login --username "${{ env.user }}" --password-stdin <<< "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}"
- name: Build and push Docker images
run: |
export NODE_TAG="${{ env.node_tag }}"
export NODE_IMAGE="${{ env.node_image_repo }}:${{ env.node_image_tag }}"
export NODE_DASHBOARD_IMAGE=${{ env.node_dashboard_image_repo }}:${{ env.node_dashboard_image_tag }}
export COMPOSE_PROFILES=node-dashboard
NODE_NAME= docker-compose build && docker-compose push