Use open source GitHub Actions to automate tasks and discuss making your very own GitHub Action.
GitHub Actions can do much more than CI/CD. In this section, we'll consider how to use existing open source actions for three tasks:
Hints
-
Browse GitHub Marketplace, this awesome list of actions, or Google for ideas.
-
The
actions
org has some interesting actions, but so does the community 👀.
Solution
name: "Triage"
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: Naturalclar/issue-action@v1.0.0
with:
keywords: '[""]'
labels: '["triage"]'
github-token: "${{ secrets.GITHUB_TOKEN }}"
2. Greet first time contributors (pull request or issue) with a greeting like "Hello, new contributor!"
Hints
-
Browse GitHub Marketplace, this awesome list of actions, or Google for ideas.
-
The
actions
org has some interesting actions, but so does the community 👀.
Solution
name: Greet first time contributors
on:
issues:
types: [opened]
jobs:
greet:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Welcome! Thanks for opening an issue in this project!'