-
-
Notifications
You must be signed in to change notification settings - Fork 19
113 lines (92 loc) · 2.96 KB
/
buildReleaseInclDocker.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#*******************************************************************************
# buidReleaseInclDocker.yml
#
# Interlisp webflow to build a Medley release and push it to github.
# And to build a multiplatform Docker image for the release and push it to Docker Hub.
#
# This workflow just calls two reuseable workflows to the two task:
# buildLoadup.yml and buildDocker.yml
#
# 2022-01-18 Frank Halasz
#
# Copyright 2022 by Interlisp.org
#
# ******************************************************************************
name: "Build/Push Release & Docker"
# Run this workflow on ...
on:
schedule:
- cron: '0 9 * * 1'
workflow_dispatch:
inputs:
draft:
description: "Mark this as a draft release"
type: choice
options:
- 'false'
- 'true'
force:
description: "Force build even if build already successfully completed for this commit"
type: choice
options:
- 'false'
- 'true'
workflow_call:
outputs:
successful:
description: "'True' if medley build completed successully"
value: ${{ jobs.complete.outputs.build_successful }}
inputs:
draft:
description: "Mark this as a draft release"
required: false
type: string
default: 'false'
force:
description: "Force build even if build already successfully completed for this commit"
required: false
type: string
default: 'false'
defaults:
run:
shell: bash
# Jobs that compose this workflow
jobs:
######################################################################################
# Regularize the inputs so they can be referenced the same way whether they are
# the result of a workflow_dispatch or a workflow_call
inputs:
runs-on: ubuntu-latest
outputs:
draft: ${{ steps.one.outputs.draft }}
force: ${{ steps.one.outputs.force }}
steps:
- id: one
run: >
if [ '${{ toJSON(inputs) }}' != 'null' ];
then
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
else
echo "draft=false" >> $GITHUB_OUTPUT;
echo "force=false" >> $GITHUB_OUTPUT;
fi
######################################################################################
# Build Loadup
do_release:
needs: inputs
uses: ./.github/workflows/buildLoadup.yml
with:
draft: ${{ needs.inputs.outputs.draft }}
force: ${{ needs.inputs.outputs.force }}
secrets: inherit
######################################################################################
# Build Docker Image
do_docker:
needs: [inputs, do_release]
uses: ./.github/workflows/buildDocker.yml
with:
draft: ${{ needs.inputs.outputs.draft }}
force: ${{ needs.inputs.outputs.force }}
secrets: inherit
######################################################################################