mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2026-01-10 09:54:43 +00:00
82 lines
2.4 KiB
YAML
82 lines
2.4 KiB
YAML
---
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# Job Name
|
|
# -------------------------------------------------------------------------------------------------
|
|
name: params
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# Custom Variables
|
|
# -------------------------------------------------------------------------------------------------
|
|
env:
|
|
MATRIX: >-
|
|
[
|
|
{
|
|
"NAME": "PHP",
|
|
"VERSION": ["5.2"],
|
|
"FLAVOUR": ["default"],
|
|
"ARCH": ["linux/amd64"]
|
|
},
|
|
{
|
|
"NAME": "PHP",
|
|
"VERSION": ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"],
|
|
"FLAVOUR": ["default"],
|
|
"ARCH": ["linux/amd64", "linux/arm64"]
|
|
}
|
|
]
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# When to run
|
|
# -------------------------------------------------------------------------------------------------
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
matrix:
|
|
description: "The determined version matrix"
|
|
value: ${{ jobs.params.outputs.matrix }}
|
|
refs:
|
|
description: "The determined git ref matrix (only during scheduled run)"
|
|
value: ${{ jobs.params.outputs.refs }}
|
|
|
|
jobs:
|
|
params:
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
refs: ${{ steps.set-refs.outputs.matrix }}
|
|
|
|
steps:
|
|
- name: "[Set-Output] Matrix"
|
|
id: set-matrix
|
|
run: |
|
|
echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )"
|
|
|
|
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)"
|
|
id: set-refs
|
|
uses: cytopia/git-ref-matrix-action@v0.1.4
|
|
with:
|
|
repository_default_branch: master
|
|
branches: master
|
|
num_latest_tags: 0
|
|
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
|
|
|
- name: "[DEBUG] Show settings'"
|
|
run: |
|
|
echo 'Matrix'
|
|
echo '--------------------'
|
|
echo '${{ steps.set-matrix.outputs.matrix }}'
|
|
echo
|
|
|
|
echo 'Matrix: Refs'
|
|
echo '--------------------'
|
|
echo '${{ steps.set-matrix-refs.outputs.matrix }}'
|
|
echo
|
|
|
|
echo 'GitHub event_name'
|
|
echo '--------------------'
|
|
echo '${{ github.event_name }}'
|
|
echo
|