-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from devilbox/workflow-params
Make input more readable
- Loading branch information
Showing
10 changed files
with
104 additions
and
109 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
|
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
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
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
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
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 |
---|---|---|
|
@@ -6,6 +6,25 @@ | |
name: params | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
# Custom Variables | ||
# ------------------------------------------------------------------------------------------------- | ||
env: | ||
NAME: PHP | ||
MATRIX_VERSION: >- | ||
[ | ||
{ | ||
"NAME": "PHP", | ||
"VERSION": "5.2" | ||
} | ||
] | ||
MATRIX_ARCH: >- | ||
[ | ||
"linux/amd64", | ||
"linux/386" | ||
] | ||
# ------------------------------------------------------------------------------------------------- | ||
# When to run | ||
# ------------------------------------------------------------------------------------------------- | ||
|
@@ -25,15 +44,6 @@ on: | |
description: "The determined git ref matrix (only during scheduled run)" | ||
value: ${{ jobs.params.outputs.matrix_refs }} | ||
|
||
### | ||
### Generic configuration | ||
### | ||
env: | ||
NAME: PHP | ||
MATRIX_VERSION: '["5.2"]' | ||
MATRIX_ARCH: '["linux/amd64","linux/386"]' | ||
|
||
|
||
jobs: | ||
params: | ||
runs-on: ubuntu-latest | ||
|
@@ -45,22 +55,28 @@ jobs: | |
matrix_refs: ${{ steps.set-matrix-refs.outputs.matrix }} | ||
|
||
steps: | ||
- name: Test JSON | ||
run: | | ||
jq -M -c \ | ||
--argjson arches '${{ env.MATRIX_ARCH }}' \ | ||
'map({NAME:.NAME, VERSION, ARCH:$arches[]})' <<<'${{ env.MATRIX_VERSION }}' | ||
- name: "Set Name" | ||
id: set-name | ||
run: | | ||
echo '::set-output name=name::${{ env.NAME }}' | ||
- name: "Set Matrix 'Version'" | ||
- name: "[Set-Output] Matrix 'Version'" | ||
id: set-matrix-version | ||
run: | | ||
echo '::set-output name=matrix::${{ env.MATRIX_VERSION }}' | ||
echo "::set-output name=matrix::$( echo '${{ env.MATRIX_VERSION }}' | jq -M -c )" | ||
- name: "Set Matrix 'Arch'" | ||
- name: "[Set-Output] Matrix 'Arch'" | ||
id: set-matrix-arch | ||
run: | | ||
echo '::set-output name=matrix::${{ env.MATRIX_ARCH }}' | ||
echo "::set-output name=matrix::$( echo '${{ env.MATRIX_ARCH }}' | jq -M -c )" | ||
- name: "Set Matrix 'Refs' (master branch and latest tag)" | ||
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)" | ||
id: set-matrix-refs | ||
uses: cytopia/[email protected] | ||
with: | ||
|
@@ -69,24 +85,24 @@ jobs: | |
num_latest_tags: 1 | ||
if: github.event_name == 'schedule' | ||
|
||
- name: "Show settings'" | ||
- name: "[DEBUG] Show settings'" | ||
run: | | ||
echo 'Name' | ||
echo '--------------------' | ||
echo ${{ steps.set-name.outputs.name }} | ||
echo '${{ steps.set-name.outputs.name }}' | ||
echo | ||
echo 'Matrix: Version' | ||
echo '--------------------' | ||
echo ${{ steps.set-matrix-version.outputs.matrix }} | ||
echo '${{ steps.set-matrix-version.outputs.matrix }}' | ||
echo | ||
echo 'Matrix: Arch' | ||
echo '--------------------' | ||
echo ${{ steps.set-matrix-arch.outputs.matrix }} | ||
echo '${{ steps.set-matrix-arch.outputs.matrix }}' | ||
echo | ||
echo 'Matrix: Refs' | ||
echo '--------------------' | ||
echo ${{ steps.set-matrix-refs.outputs.matrix }} | ||
echo '${{ steps.set-matrix-refs.outputs.matrix }}' | ||
echo |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: Release Drafter | ||
|
||
on: | ||
|
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,2 @@ | ||
Makefile.docker | ||
Makefile.lint |
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,13 @@ | ||
--- | ||
extends: default | ||
|
||
ignore: | | ||
.yamllint | ||
|
||
|
||
rules: | ||
truthy: | ||
allowed-values: ['true', 'false'] | ||
check-keys: False | ||
level: error | ||
line-length: disable |
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