mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
add reusable workflows
This commit is contained in:
42
.github/workflows/Params.yml
vendored
Normal file
42
.github/workflows/Params.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Params
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
pyver:
|
||||
description: 'Python version.'
|
||||
required: false
|
||||
default: '3.10'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the tool.'
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
params:
|
||||
description: "Parameters to be used in other jobs."
|
||||
value: ${{ jobs.Params.outputs.params }}
|
||||
|
||||
jobs:
|
||||
|
||||
Params:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
params: ${{ steps.params.outputs.params }}
|
||||
steps:
|
||||
|
||||
- id: params
|
||||
shell: python
|
||||
run: |
|
||||
name = '${{ inputs.name }}'
|
||||
params = {
|
||||
'package': name,
|
||||
'pyver': '${{ inputs.pyver }}',
|
||||
'artifacts': {
|
||||
'coverage': f'{name}-coverage',
|
||||
'typing': f'{name}-typing',
|
||||
'wheel': f'{name}-wheel',
|
||||
'doc': f'{name}-doc',
|
||||
}
|
||||
}
|
||||
print(f'::set-output name=params::{params!s}')
|
||||
Reference in New Issue
Block a user