updated examples
هذا الالتزام موجود في:
10
.github/workflows/00-basic.yml
مباع
10
.github/workflows/00-basic.yml
مباع
@@ -3,15 +3,7 @@
|
||||
name: Basic Workflow
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the main branch
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
|
@@ -1,14 +1,26 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI
|
||||
name: Basic Workflow
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the main branch
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches:
|
||||
- main
|
||||
- 'mona/octocat'
|
||||
- 'releases/**'
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- v2
|
||||
- v1.*
|
||||
paths:
|
||||
- '**.js'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
# * is a special character in YAML so you have to quote this string
|
||||
- cron: '30 5,17 * * *'
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
@@ -28,15 +40,3 @@ jobs:
|
||||
# Runs a single command using the runners shell
|
||||
- name: Run a one-line script
|
||||
run: echo Hello, world!
|
||||
reusable-workflow-mona:
|
||||
uses: Codebytes/github-actions-demos/.github/workflows/reusable-ci.yml@main
|
||||
with:
|
||||
username: mona
|
||||
secrets:
|
||||
token: "shh!"
|
||||
reusable-workflow-chris:
|
||||
uses: Codebytes/github-actions-demos/.github/workflows/reusable-ci.yml@main
|
||||
with:
|
||||
username: Chris
|
||||
secrets:
|
||||
token: "shh!"
|
@@ -1,6 +1,6 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Basic Workflow
|
||||
name: Basic Workflow with Multiple Jobs
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
|
@@ -36,7 +36,7 @@ jobs:
|
||||
job3:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ job1 ]
|
||||
needs: [ job2 ]
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Basic Workflow
|
||||
name: Variables
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Basic Workflow
|
||||
name: Variable Hierarchy
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
|
@@ -1,27 +0,0 @@
|
||||
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 }}
|
||||
|
||||
|
المرجع في مشكلة جديدة
حظر مستخدم