Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/1-helllo-world.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Hello World

on:
workflow_dispatch:

jobs:
say-hello-inline-bash:
runs-on: ubuntu-24.04
steps:
- run: echo "Hello, World from inline bash script in a GitHub Actions Workflow!"

say-hello-inline-python:
runs-on: ubuntu-24.04
steps:
- run: print("Hello, World from inline Python script! in a GitHub Actions Workflow!")
shell: python

say-hello-action:
runs-on: ubuntu-24.04
steps:
- uses: actions/hello-world-javascript-action@v1
with:
who-to-greet: "Hello, World from a JavaScript Action in a GitHub Actions Workflow!"
31 changes: 31 additions & 0 deletions .github/workflows/2-core-features-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Workflows, Jobs, and Steps

on:
workflow_dispatch:

jobs:
job-1:
runs-on: ubuntu-24.04
steps:
- run: echo "This is job consists of "
- run: echo "one or more steps"
- run: echo "Which run sequentially"
- run: echo "within the same compute environment"
job-2:
runs-on: ubuntu-24.04
steps:
- run: echo "Multiple jobs can run in parallel"
job-3:
runs-on: ubuntu-24.04
needs:
- job-1
- job-2
steps:
- run: echo "They can also depend on one another"
job-4:
runs-on: ubuntu-24.04
needs:
- job-2
- job-3
steps:
- run: echo "... to from a directed acyclic graph (DAG) of jobs"
38 changes: 38 additions & 0 deletions .github/workflows/2-core-features-2-triggers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Triggering Events
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows

on:
### https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push
push:
branches:
# Filter patterns cheat sheet:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- "master"

### https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
pull_request:
## The default is to trigger on the following types of events:
types:
- opened
- synchronize
- reopened
paths:
# include markdown files
- "03-core-features/filters/*.md"
# Exclude txt files
- "!03-core-features/filters/*.txt"

### https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
# schedule:
# - cron: "0 0 * * *" # Midnight UTC

## Manual Trigger
workflow_dispatch:
jobs:
echo-event:
runs-on: ubuntu-24.04
steps:
- name: Dump full event JSON
run: |
echo "=== $GITHUB_EVENT_NAME payload ==="
cat "$GITHUB_EVENT_PATH"
2 changes: 2 additions & 0 deletions 03-core-features/filters/included-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Modified again
3rd time
6 changes: 6 additions & 0 deletions git-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!bin/bash

git add .
read -p "Enter commit message: " choice
git commit -m "$choice"
git push origin main