Skip to content

Commit

Permalink
First add
Browse files Browse the repository at this point in the history
  • Loading branch information
jano42 committed Sep 23, 2020
0 parents commit f90e6fa
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
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

61 changes: 61 additions & 0 deletions action.yml
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

0 comments on commit f90e6fa

Please sign in to comment.