Template for GitHub action with golang
- please replace
action-go-templateto your project name.
Create a workflow (eg: .github/workflows/my-action.yml see Creating a Workflow file) to utilize the labeler action with content:
name: "Pull Request Labeler"
on:
- pull_request
jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: hi-actions/action-go-template@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LABEL_CONFIG: .github/labeler.yml # this is defaultNote: This grants access to the GITHUB_TOKEN so the action can make calls to GitHub's rest API