-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f90e6fa
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# build-yadoms-action github action | ||
|
||
This action allow to generate a yadoms build for Windows using Github Actions. | ||
|
||
## Inputs | ||
|
||
|
||
### `entrypoint` | ||
|
||
* optional * The entrypoint override (default : C:\entrypoint_docker.cmd) | ||
|
||
### `param1`, `param2`, `param3`, `param4` | ||
|
||
* optional * Free parameters passed to docker container | ||
|
||
## Outputs | ||
|
||
### `yadomsVersion` | ||
|
||
The current building yadoms full version, example : '2.5.0-beta.1' | ||
|
||
|
||
## Example usage | ||
|
||
- name: Yadoms build script | ||
uses: Yadoms/build-[email protected]1 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# buildyadoms.yml | ||
name: 'Yadoms build script for Windows' | ||
description: 'Use to generate yadoms binaries for Windows, 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: 'C:/entrypoint_docker.cmd' | ||
buildImage: | ||
description: 'The image to use for building yadoms' | ||
required: true | ||
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: 'docker login --username ${{ inputs.username }} --password "${{ inputs.password }}"' | ||
name : 'Login to docker' | ||
shell: cmd | ||
- run: 'docker run ${{inputs.privileged}} -v %CD%:C:/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: cmd | ||
- id: get-yadoms-version | ||
run: Write-Host "::set-output name=yadomsVersion::$(Get-Content .\sources\server\changelog.md -First 1 | %{ $_.Split(' ')[1]; })" | ||
name : 'Find yadoms version' | ||
shell: powershell | ||
|
||
branding: | ||
icon : home | ||
color: blue | ||
|