Create reusable-ci.yml
هذا الالتزام موجود في:
27
.github/workflows/reusable-ci.yml
مباع
Normal file
27
.github/workflows/reusable-ci.yml
مباع
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Reusable workflow example
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
username:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
example_job:
|
||||
name: Pass input and secrets to my-action
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v5
|
||||
with:
|
||||
script: return "Hello ${{ inputs.username }}!"
|
||||
username: ${{ inputs.username }}
|
||||
token: ${{ secrets.token }}
|
||||
|
||||
- name: Run a one-line script
|
||||
run: echo Hello from reuseable workflow, ${{ inputs.username }}
|
||||
|
||||
|
المرجع في مشكلة جديدة
حظر مستخدم