Nice work adding a job to your workflow! 💃
Steps are the building blocks of jobs, allowing you to automate tasks like checking out code, running commands, or using open source Actions. They run sequentially in the job's environment but as independent processes. Unlike traditional code with a shared variable space, inputs and outputs must be explicitly declared.
Tip
The best part of GitHub Actions is the marketplace where the community has already built many free useful tools to find and customize!
-
In the
welcome-workflowbranch, open your.github/workflows/welcome.ymlfile. -
Add a step to the
welcomejob to post a comment on new pull requests using GitHub CLI:name: Post welcome comment on: pull_request: types: [opened] permissions: pull-requests: write jobs: welcome: 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 }}
-
Commit your changes directly to
welcome-workflowbranch. -
With the step information added, Mona will review your work and prepare the next step in this exercise!
Having trouble? 🤷
- Make sure the
stepssection is under thewelcomejob and properly indented. - Ensure you have the correct environment variables set.