mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2026-01-10 18:04:43 +00:00
71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
---
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# Job Name
|
|
# -------------------------------------------------------------------------------------------------
|
|
name: params
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
# Custom Variables
|
|
# -------------------------------------------------------------------------------------------------
|
|
env:
|
|
MATRIX: >-
|
|
[
|
|
{
|
|
"NAME": "PHP",
|
|
"VERSION": ["5.3", "5.4"],
|
|
"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: 1
|
|
if: github.event_name == 'schedule'
|
|
|
|
- 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
|