Create a GitHub Action and use it in a workflow.
Welcome to "Hello GitHub Actions"! 👋
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.
- The "GitHub Actions" user documentation, see GitHub 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".
- If you want to learn more about the
pull_request
event before using it, see "pull_request".
To get you started, we used actions to go ahead and made a branch and pull request for you.
- 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.
- 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
andcompare:welcome-workflow
, click Create pull request. - Navigate to the Code tab.
- From the main branch dropdown, click on the welcome-workflow branch.
- Navigate to the
.github/workflows/
folder, then select Add file and click on Create new file. - In the Name your file... field, enter
welcome.yml
. - Add the following content to the
welcome.yml
file:name: Post welcome comment on: pull_request: types: [opened] permissions: pull-requests: write
- To commit your changes, click Commit new file.
- 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.
Get help: Post in our discussion board • Review the GitHub status page
© 2023 GitHub • Code of Conduct • MIT License