-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
65 lines (63 loc) · 2 KB
/
action.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
# buildyadoms.yml
name: 'Yadoms build script'
description: 'Use to generate yadoms binaries, using docker images'
inputs:
privileged:
description: 'run container in privileged mode : setup to --privileged'
required: false
default: ''
param1:
description: 'Generic parameter 1'
required: false
default: ''
param2:
description: 'Generic parameter 1'
required: false
default: ''
param3:
description: 'Generic parameter 3'
required: false
default: ''
param4:
description: 'Generic parameter 4'
required: false
default: ''
entrypoint:
description: 'entrypoint override'
required: false
default: '/entrypoint.sh'
buildImage:
description: 'The image to use for building yadoms'
required: true
registry:
description: 'The docker container registry'
required: false
default: ''
username:
description: 'The docker hub/github package username'
required: false
default: ''
password:
description: 'The docker hub/github package password/token'
required: false
default: ''
outputs:
yadomsVersion:
description: 'Yadoms version'
value: ${{ steps.get-yadoms-version.outputs.yadomsVersion }}
runs:
using: "composite"
steps:
- run: 'echo ${{ inputs.password }} | docker login ${{ inputs.registry }} --username ${{ inputs.username }} --password-stdin'
name : 'Login to docker'
shell: bash
- run: 'docker run ${{inputs.privileged}} -v $(pwd):/work -e MAKE_PACKAGE=true -e PARAM1=${{ inputs.param1 }} -e PARAM2=${{ inputs.param2 }} -e PARAM3=${{ inputs.param3 }} -e PARAM4=${{ inputs.param4 }} ${{ inputs.buildImage }} ${{ inputs.entrypoint }}'
name : 'Build of Yadoms'
shell: bash
- id: get-yadoms-version
run: echo "yadomsVersion=$(head -1 sources/server/changelog.md | awk '{print $2}')" >> $GITHUB_OUTPUT
name : 'Find Yadoms version'
shell: bash
branding:
icon : home
color: blue