diff --git a/.github/workflows/00-basic.yml b/.github/workflows/00-basic.yml index a1aa505..1e41a93 100644 --- a/.github/workflows/00-basic.yml +++ b/.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: diff --git a/.github/workflows/blank.yml b/.github/workflows/00a-basic-filters.yml similarity index 70% rename from .github/workflows/blank.yml rename to .github/workflows/00a-basic-filters.yml index 96ed01d..d1f75da 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/00a-basic-filters.yml @@ -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!" diff --git a/.github/workflows/01-basic-multiple-jobs.yml b/.github/workflows/01-basic-multiple-jobs.yml index efaa977..eb7ed58 100644 --- a/.github/workflows/01-basic-multiple-jobs.yml +++ b/.github/workflows/01-basic-multiple-jobs.yml @@ -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: diff --git a/.github/workflows/02-basic-multiple-jobs-needs.yml b/.github/workflows/02-basic-multiple-jobs-needs.yml index 90c7379..9150df7 100644 --- a/.github/workflows/02-basic-multiple-jobs-needs.yml +++ b/.github/workflows/02-basic-multiple-jobs-needs.yml @@ -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: diff --git a/.github/workflows/03-environment-variables.yaml b/.github/workflows/03-environment-variables.yaml index c46a5d8..26e90ba 100644 --- a/.github/workflows/03-environment-variables.yaml +++ b/.github/workflows/03-environment-variables.yaml @@ -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: diff --git a/.github/workflows/03-environment-variables2.yaml b/.github/workflows/03-environment-variables2.yaml index 300236d..cd320d1 100644 --- a/.github/workflows/03-environment-variables2.yaml +++ b/.github/workflows/03-environment-variables2.yaml @@ -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: diff --git a/.github/workflows/reusable-ci.yml b/.github/workflows/reusable-ci.yml deleted file mode 100644 index cfd7930..0000000 --- a/.github/workflows/reusable-ci.yml +++ /dev/null @@ -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 }} - -