diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..8ac6b8c
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "monthly"
diff --git a/.github/steps/-step.txt b/.github/steps/-step.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/.github/steps/-step.txt
@@ -0,0 +1 @@
+0
diff --git a/.github/steps/0-welcome.md b/.github/steps/0-welcome.md
new file mode 100644
index 0000000..1b85348
--- /dev/null
+++ b/.github/steps/0-welcome.md
@@ -0,0 +1 @@
+
diff --git a/.github/steps/1-create-a-workflow.md b/.github/steps/1-create-a-workflow.md
new file mode 100644
index 0000000..6044877
--- /dev/null
+++ b/.github/steps/1-create-a-workflow.md
@@ -0,0 +1,41 @@
+## Step 1: Create a workflow file
+
+_Welcome to "Hello GitHub Actions"! :wave:_
+
+**What is _GitHub Actions_?**: GitHub Actions is a flexible way to automate nearly every aspect of your team's software workflow. You can automate testing, continuously deploy, review code, manage issues and pull requests, and much more. The best part, these workflows are stored as code in your repository and easily shared and reused across teams. To learn more, check out these resources:
+
+- The GitHub Actions feature page, see [GitHub Actions](https://github.com/features/actions).
+- The "GitHub Actions" user documentation, see [GitHub Actions](https://docs.github.com/actions).
+
+**What is a _workflow_?**: A workflow is a configurable automated process that will run one or more jobs. Workflows are defined in special files in the `.github/workflows` directory and they execute based on your chosen event. For this exercise, we'll use a `pull_request` event.
+
+- To read more about workflows, jobs, and events, see "[Understanding GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions)".
+- If you want to learn more about the `pull_request` event before using it, see "[pull_request](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)".
+
+To get you started, we ran an Actions workflow in your new repository that, among other things, created a branch for you to work in, called `welcome-workflow`.
+
+### :keyboard: Activity: Create a workflow file
+
+1. Open a new browser tab, and navigate to this same repository. Then, work on the steps in your second tab while you read the instructions in this tab.
+1. Create a pull request. This will contain all of the changes you'll make throughout this part of the course.
+
+ Click the **Pull Requests** tab, click **New pull request**, set `base: main` and `compare:welcome-workflow`, click **Create pull request**, then click **Create pull request** again.
+
+1. Navigate to the **Code** tab.
+1. From the **main** branch dropdown, click on the **welcome-workflow** branch.
+1. Navigate to the `.github/workflows/` folder, then select **Add file** and click on **Create new file**.
+1. In the **Name your file** field, enter `welcome.yml`.
+1. Add the following content to the `welcome.yml` file:
+
+ ```yaml copy
+ name: Post welcome comment
+ on:
+ pull_request:
+ types: [opened]
+ permissions:
+ pull-requests: write
+ ```
+
+1. To commit your changes, click **Commit changes**.
+1. Type a commit message, select **Commit directly to the welcome-workflow branch** and click **Commit changes**.
+1. Wait about 20 seconds, then refresh this page (the one you're following instructions from). A separate Actions workflow in the repository (not the workflow you created) will run and will automatically replace the contents of this README file with instructions for the next step.
diff --git a/.github/steps/2-add-a-job.md b/.github/steps/2-add-a-job.md
new file mode 100644
index 0000000..da1c71f
--- /dev/null
+++ b/.github/steps/2-add-a-job.md
@@ -0,0 +1,38 @@
+## Step 2: Add a job to your workflow file
+
+_Nice work! :tada: You added a workflow file!_
+
+Here's what the entries in the `welcome.yml` file, on the `welcome-workflow` branch, mean:
+
+- `name: Post welcome comment` gives your workflow a name. This name will appear in the Actions tab of your repository.
+- `on: pull_request: types: [opened]` indicates that your workflow will execute whenever someone opens a pull request in your repository.
+- `permissions` assigns the workflow permissions to operate on the repository
+- `pull-requests: write` gives the workflow permission to write to pull requests. This is needed to create the welcome comment.
+
+Next, we need to specify jobs to run.
+
+**What is a _job_?**: A job is a set of steps in a workflow that execute on the same runner (a runner is a server that runs your workflows when triggered). Workflows have jobs, and jobs have steps. Steps are executed in order and are dependent on each other. You'll add steps to your workflow later in the course. To read more about jobs, see "[Jobs](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#jobs)".
+
+In the following activity, you'll add a "build" job to your workflow. You'll specify `ubuntu-latest` as the fastest, and cheapest, job runner available. If you want to read more about why we'll use that runner, see the code explanation for the line `runs-on: ubuntu-latest` in the "[Understanding the workflow file](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#understanding-the-workflow-file)" article.
+
+### :keyboard: Activity: Add a job to your workflow file
+
+1. In a separate browser tab, make sure you are on the `welcome-workflow` branch and open your `.github/workflows/welcome.yml` file.
+1. Edit the file and update its contents to:
+
+ ```yaml copy
+ name: Post welcome comment
+ on:
+ pull_request:
+ types: [opened]
+ permissions:
+ pull-requests: write
+ jobs:
+ build:
+ name: Post welcome comment
+ runs-on: ubuntu-latest
+ ```
+
+1. Click **Commit changes** in the top right of the workflow editor.
+1. Type a commit message and commit your changes directly to the `welcome-workflow` branch.
+1. Wait about 20 seconds, then refresh this page (the one you're following instructions from). Another workflow will run and will replace the contents of this README file with instructions for the next step.
diff --git a/.github/steps/3-add-actions.md b/.github/steps/3-add-actions.md
new file mode 100644
index 0000000..8e38197
--- /dev/null
+++ b/.github/steps/3-add-actions.md
@@ -0,0 +1,40 @@
+## Step 3: Add a step to your workflow file
+
+_Nice work adding a job to your workflow! :dancer:_
+
+Workflows have jobs, and jobs have steps. So now we'll add a step to your workflow.
+
+**What are _steps_?**: Actions steps run - in the order they are specified, from the top down - when a workflow job is processed. Each step must pass for the next step to run.
+
+Each step consists of either a shell script that's executed, or a reference to an action that's run. When we talk about an action (with a lowercase "a") in this context, we mean a reusable unit of code. You can find out about actions in "[Finding and customizing actions](https://docs.github.com/en/actions/learn-github-actions/finding-and-customizing-actions)," but for now we'll use a shell script in our workflow step.
+
+Update your workflow to make it post a comment on new pull requests. It will do this using a [bash](https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29) script and [GitHub CLI](https://cli.github.com/).
+
+### :keyboard: Activity: Add a step to your workflow file
+
+1. Still working on the `welcome-workflow` branch, open your `welcome.yml` file.
+1. Update the contents of the file to:
+
+ ```yaml copy
+ name: Post welcome comment
+ on:
+ pull_request:
+ types: [opened]
+ permissions:
+ pull-requests: write
+ jobs:
+ build:
+ name: Post welcome comment
+ runs-on: ubuntu-latest
+ steps:
+ - run: gh pr comment $PR_URL --body "Welcome to the repository!"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ PR_URL: ${{ github.event.pull_request.html_url }}
+ ```
+
+ **Note:** The step you've added uses GitHub CLI (`gh`) to add a comment when a pull request is opened. To allow GitHub CLI to post a comment, we set the `GITHUB_TOKEN` environment variable to the value of the `GITHUB_TOKEN` secret, which is an installation access token, created when the workflow runs. For more information, see "[Automatic token authentication](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)." We set the `PR_URL` environment variable to the URL of the newly created pull request, and we use this in the `gh` command.
+
+1. Click **Commit changes** in the top right of the workflow editor.
+1. Type your commit message and commit your changes directly to your branch.
+1. Wait about 20 seconds, then refresh this page (the one you're following instructions from). Another workflow will run and will replace the contents of this README file with instructions for the next step.
diff --git a/.github/steps/4-merge-your-pull-request.md b/.github/steps/4-merge-your-pull-request.md
new file mode 100644
index 0000000..f30a045
--- /dev/null
+++ b/.github/steps/4-merge-your-pull-request.md
@@ -0,0 +1,13 @@
+## Step 4: Merge your workflow file
+
+_You're now able to write and run an Actions workflow! :sparkles:_
+
+Merge your changes so the action will be a part of the `main` branch.
+
+### :keyboard: Activity: Merge your workflow file
+
+1. In your repo, click on the **Pull requests** tab.
+1. Click on the pull request you created in step 1.
+1. Click **Merge pull request**, then click **Confirm merge**.
+1. Optionally, click **Delete branch** to delete your `welcome-workflow` branch.
+1. Wait about 20 seconds, then refresh this page (the one you're following instructions from). Another workflow will run and will replace the contents of this README file with instructions for the next step.
diff --git a/.github/steps/5-trigger.md b/.github/steps/5-trigger.md
new file mode 100644
index 0000000..503bd03
--- /dev/null
+++ b/.github/steps/5-trigger.md
@@ -0,0 +1,18 @@
+## Step 5: Trigger the workflow
+
+_You've now added a fully functioning workflow to your repository! :smile:_
+
+The shell script in the workflow will run whenever a new pull request is opened.
+
+**Seeing your _action_ in action**: The status of each workflow run that's triggered is shown in the pull request before it's merged: look for **All checks have passed** when you try out the steps below. You can also see a list of all the workflows that are running, or have finished running, in the **Actions** tab of your repository. From there, you can click on each workflow run to view more details and access log files.
+
+![A screenshot of the Actions tab showing a list of workflow runs.](https://user-images.githubusercontent.com/16547949/62388049-4e64e600-b52a-11e9-8bf5-db0c5452360f.png)
+
+### :keyboard: Activity: Trigger the workflow
+
+1. Make a new branch named `test-workflow`.
+1. Make a change, such as adding an emoji to your README.md file, and commit the change directly to your new branch.
+1. In the **Pull requests** tab, create a pull request that will merge `test-workflow` into `main`.
+1. Watch the workflow running in the checks section of the pull request.
+1. Notice the comment that the workflow adds to the pull request.
+1. Wait about 20 seconds, then refresh this page (the one you're following instructions from). Another workflow will run and will replace the contents of this README file with instructions for the next step.
diff --git a/.github/steps/X-finish.md b/.github/steps/X-finish.md
new file mode 100644
index 0000000..278033e
--- /dev/null
+++ b/.github/steps/X-finish.md
@@ -0,0 +1,21 @@
+## Finish
+
+_Congratulations friend, you've completed this course!_
+
+
+
+Here's a recap of all the tasks you've accomplished in your repository:
+
+- You've created your first GitHub Actions workflow file.
+- You learned where to make your workflow file.
+- You defined an event trigger, a job, and a step for your workflow.
+- You're ready to automate anything you can dream of.
+
+### What's next?
+
+- Learn more about GitHub Actions by reading "[Learn GitHub Actions](https://docs.github.com/actions/learn-github-actions)"
+- Use actions created by others in [awesome-actions](https://github.com/sdras/awesome-actions)
+- We'd love to hear what you thought of this course [in our discussion board](https://github.com/orgs/skills/discussions/categories/hello-github-actions)
+- [Take another course on GitHub Actions](https://skills.github.com/#automate-workflows-with-github-actions)
+- Learn more about GitHub by reading the "[Get started](https://docs.github.com/get-started)" docs
+- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore)
diff --git a/.github/workflows/0-welcome.yml b/.github/workflows/0-welcome.yml
new file mode 100644
index 0000000..90513df
--- /dev/null
+++ b/.github/workflows/0-welcome.yml
@@ -0,0 +1,91 @@
+name: Step 0, Welcome
+
+# This step triggers after the learner creates a new repository from the template.
+# This workflow updates from step 0 to step 1.
+
+# This will run every time we create push a commit to `main`.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_start:
+ name: On start
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 0.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 0 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # Make a branch, file, and commit for the learner.
+ - name: Prepare a branch, and file
+ run: |
+ echo "Make sure we are on step 0"
+ if [ "$(cat .github/steps/-step.txt)" != 0 ]
+ then
+ echo "Current step is not 0"
+ exit 0
+ fi
+
+ echo "Make a branch"
+ BRANCH=welcome-workflow
+ git checkout -b $BRANCH
+
+ echo "Make a commit"
+ git config user.name github-actions[bot]
+ git config user.email github-actions[bot]@users.noreply.github.com
+ git commit --allow-empty --message="Create an empty commit"
+
+ echo "Push"
+ git push --set-upstream origin $BRANCH
+
+ echo "Restore main"
+ git checkout main
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ # In README.md, switch step 0 for step 1.
+ - name: Update to step 1
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 0
+ to_step: 1
+ branch_name: welcome-workflow
diff --git a/.github/workflows/1-create-a-workflow.yml b/.github/workflows/1-create-a-workflow.yml
new file mode 100644
index 0000000..e3ef2b5
--- /dev/null
+++ b/.github/workflows/1-create-a-workflow.yml
@@ -0,0 +1,71 @@
+name: Step 1, Create a workflow
+
+# This step triggers after every push to welcome-workflow.
+# This workflow updates from step 1 to step 2.
+
+# This will run every time we push to welcome-workflow.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - welcome-workflow
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_create_workflow:
+ name: On create workflow
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 1.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 1 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # Verify the learner added the file contents.
+ - name: Check workflow contents, name
+ uses: skills/action-check-file@v1
+ with:
+ file: ".github/workflows/welcome.yml"
+ search: "name:"
+
+ # In README.md, switch step 1 for step 2.
+ - name: Update to step 2
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 1
+ to_step: 2
+ branch_name: welcome-workflow
diff --git a/.github/workflows/2-add-a-job.yml b/.github/workflows/2-add-a-job.yml
new file mode 100644
index 0000000..d48926c
--- /dev/null
+++ b/.github/workflows/2-add-a-job.yml
@@ -0,0 +1,71 @@
+name: Step 2, Add a job
+
+# This step triggers after every push to welcome-workflow.
+# This workflow updates from step 2 to step 3.
+
+# This will run every time we push to welcome-workflow.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - welcome-workflow
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_add_job:
+ name: On add job
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 2.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 2 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # Verify the learner added the file contents.
+ - name: Check workflow contents, jobs
+ uses: skills/action-check-file@v1
+ with:
+ file: ".github/workflows/welcome.yml"
+ search: "jobs:"
+
+ # In README.md, switch step 2 for step 3.
+ - name: Update to step 3
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 2
+ to_step: 3
+ branch_name: welcome-workflow
diff --git a/.github/workflows/3-add-actions.yml b/.github/workflows/3-add-actions.yml
new file mode 100644
index 0000000..424be38
--- /dev/null
+++ b/.github/workflows/3-add-actions.yml
@@ -0,0 +1,71 @@
+name: Step 3, Add actions
+
+# This step triggers after every push to welcome-workflow.
+# This workflow updates from step 3 to step 4.
+
+# This will run every time we push to welcome-workflow.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - welcome-workflow
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_add_actions:
+ name: On add actions
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 3.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 3 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # Verify the learner added the file contents.
+ - name: Check workflow contents, steps
+ uses: skills/action-check-file@v1
+ with:
+ file: ".github/workflows/welcome.yml"
+ search: "steps:"
+
+ # In README.md, switch step 3 for step 4.
+ - name: Update to step 4
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 3
+ to_step: 4
+ branch_name: welcome-workflow
diff --git a/.github/workflows/4-merge-your-pull-request.yml b/.github/workflows/4-merge-your-pull-request.yml
new file mode 100644
index 0000000..44378bd
--- /dev/null
+++ b/.github/workflows/4-merge-your-pull-request.yml
@@ -0,0 +1,64 @@
+name: Step 4, Merge your pull request
+
+# This step triggers after a pull request is merged to `main`.
+# This workflow updates from step 4 to step 5.
+
+# This will run every time we create push a commit to `main`.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_merge:
+ name: On merge
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 4.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 4 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # In README.md, switch step 4 for step 5.
+ - name: Update to step 5
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 4
+ to_step: 5
+ branch_name: welcome-workflow
diff --git a/.github/workflows/5-trigger.yml b/.github/workflows/5-trigger.yml
new file mode 100644
index 0000000..d12edc7
--- /dev/null
+++ b/.github/workflows/5-trigger.yml
@@ -0,0 +1,66 @@
+name: Step 5, Trigger the workflow
+
+# This step triggers after we finish running "Post welcome comment".
+# This workflow updates from step 5 to step X.
+
+# This will run every time we finish running "Post welcome comment".
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ workflow_run:
+ workflows:
+ - Post welcome comment
+ types:
+ - completed
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_trigger:
+ name: On trigger
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 5.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 5 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # In README.md, switch step 5 for step X.
+ - name: Update to step X
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 5
+ to_step: X
+ branch_name: test-workflow
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..773bfd6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,37 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+
+# Packages #
+############
+# it's better to unpack these files and commit the raw source
+# git has its own built in compression methods
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+
+# Logs and databases #
+######################
+*.log
+*.sql
+*.sqlite
+
+# OS generated files #
+######################
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+ehthumbs.db
+Thumbs.db
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..6c5bc3d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,7 @@
+Copyright (c) GitHub, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f121210
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+
+
+# Hello GitHub Actions
+
+_Create and run a GitHub Actions workflow._
+
+
+
+## Welcome
+
+Automation is key for streamlining your work processes, and [GitHub Actions](https://docs.github.com/actions) is the best way to supercharge your workflow.
+
+- **Who is this for**: Developers, DevOps engineers, students, managers, teams, GitHub users.
+- **What you'll learn**: How to create workflow files, trigger workflows, and find workflow logs.
+- **What you'll build**: An Actions workflow that will check emoji shortcode references in Markdown files.
+- **Prerequisites**: In this course you will work with issues and pull requests, as well as edit files. We recommend you take the [Introduction to GitHub](https://github.com/skills/introduction-to-github) course first.
+- **How long**: This course can be finished in less than two hours.
+
+In this course, you will:
+
+1. Create a workflow
+2. Add a job
+3. Add a run step
+4. Merge your pull request
+5. See effect of the workflow
+
+### How to start this course
+
+[![start-course](https://user-images.githubusercontent.com/1221423/235727646-4a590299-ffe5-480d-8cd5-8194ea184546.svg)](https://github.com/new?template_owner=skills&template_name=hello-github-actions&owner=%40me&name=skills-hello-github-actions&description=My+clone+repository&visibility=public)
+
+1. Right-click **Start course** and open the link in a new tab.
+2. In the new tab, most of the prompts will automatically fill in for you.
+ - For owner, choose your personal account or an organization to host the repository.
+ - We recommend creating a public repository, as private repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
+ - Scroll down and click the **Create repository** button at the bottom of the form.
+3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README.
+
+