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..9ff13a5
--- /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..80dd6f2
--- /dev/null
+++ b/.github/steps/1-create-a-workflow.md
@@ -0,0 +1,43 @@
+
+
+## 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 used actions to go ahead and made a branch and pull request for you.
+
+### :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 to view all the changes you'll make throughout this course. Click the **Pull Requests** tab, click **New pull request**, set `base: main` and `compare:welcome-workflow`, click **Create pull request**.
+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
+ name: Post welcome comment
+ on:
+ pull_request:
+ types: [opened]
+ permissions:
+ pull-requests: write
+ ```
+1. To commit your changes, click **Commit new file**.
+1. Wait about 20 seconds for actions to run, then refresh this page (the one you're following instructions from) and an action will automatically close this step and open the next one.
diff --git a/.github/steps/2-add-a-job.md b/.github/steps/2-add-a-job.md
new file mode 100644
index 0000000..d2831fd
--- /dev/null
+++ b/.github/steps/2-add-a-job.md
@@ -0,0 +1,43 @@
+
+
+## Step 2: Add a job to your workflow file
+
+_Nice work! :tada: You added a workflow file!_
+
+Here's what it means:
+
+- `name: Post welcome comment` gives your workflow a name. This name appears on any pull request or in the Actions tab of your repository.
+- `on: pull_request: types: [opened]` indicates that your workflow will execute anytime a pull request opens 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. We'll add steps in the next step of this exercise. To read more about jobs, see "[Jobs](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#jobs)".
+
+In this step of our exercise, we will add a "build" job. We will 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. Open your `welcome.yml` file.
+2. Update the contents of the file to:
+ ```yaml
+ name: Post welcome comment
+ on:
+ pull_request:
+ types: [opened]
+ permissions:
+ pull-requests: write
+ jobs:
+ build:
+ name: Post welcome comment
+ runs-on: ubuntu-latest
+ ```
+3. Click **Start commit** in the top right of the workflow editor.
+4. Type your commit message and commit your changes directly to your branch.
+5. Wait about 20 seconds for actions to run, then refresh this page (the one you're following instructions from) and an action will automatically close this step and open the next one.
diff --git a/.github/steps/3-add-actions.md b/.github/steps/3-add-actions.md
new file mode 100644
index 0000000..60386c6
--- /dev/null
+++ b/.github/steps/3-add-actions.md
@@ -0,0 +1,40 @@
+
+
+## Step 3: Add actions 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 steps to your workflow.
+
+**What are _steps_?**: Actions steps will run during our job in order. Each step is either a shell script that will be executed, or an action that will be run. Each step must pass for the next step to run. Actions steps can be used from within the same repository, from any other public repository, or from a published Docker container image.
+
+In our action, we post a comment on the pull request using a [bash](https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29) script and [GitHub CLI](https://cli.github.com/).
+
+### :keyboard: Activity: Add Actions steps to your workflow file
+
+1. Open your `welcome.yml` file.
+2. Update the contents of the file to:
+ ```yaml
+ 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 }}
+ ```
+3. Click **Start commit** in the top right of the workflow editor.
+4. Type your commit message and commit your changes directly to your branch.
+5. Wait about 20 seconds for actions to run, then refresh this page (the one you're following instructions from) and an action will automatically close this step and open the next one.
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..f270182
--- /dev/null
+++ b/.github/steps/4-merge-your-pull-request.md
@@ -0,0 +1,19 @@
+
+
+## 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 for actions to run, then refresh this page (the one you're following instructions from) and an action will automatically close this step and open the next one.
diff --git a/.github/steps/5-trigger.md b/.github/steps/5-trigger.md
new file mode 100644
index 0000000..92ab299
--- /dev/null
+++ b/.github/steps/5-trigger.md
@@ -0,0 +1,23 @@
+
+
+## Step 5: Trigger the workflow
+
+_You've now got a fully functioning workflow! :smile:_
+
+Your new action will run any time a pull request has been opened.
+
+**Seeing your _action_ in action**: The status of your action is shown in a pull request before you merge, look for **All checks have passed** when you try out the steps below. You can also view them from the **Actions** tab in your repository. From there, you will see all the actions that have run, and you can click on each action to view details and access log files.
+
+![View an action's log](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. Commit any change to your branch, such as adding an emoji to your README.md file.
+1. Create the pull request on your branch.
+1. See your action run on your pull request.
+1. Wait about 20 seconds for actions to run, then refresh this page (the one you're following instructions from) and an action will automatically close this step and open the next one.
diff --git a/.github/steps/X-finish.md b/.github/steps/X-finish.md
new file mode 100644
index 0000000..ac28637
--- /dev/null
+++ b/.github/steps/X-finish.md
@@ -0,0 +1,26 @@
+
+
+## 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 created an event trigger, a job, and steps 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 GitHub Skills course](https://github.com/skills).
+- 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..18a8bc9
--- /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
+ git config user.email github-actions@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..5c324c6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,75 @@
+
+
+
+
+# Hello GitHub Actions
+
+_Create a GitHub Action and use it in a 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 actions
+4. Merge your pull request
+5. See the action run
+
+### 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.
+
+