Fetch Issues and Send Notifications #265
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Issues and Send Notifications | |
on: | |
workflow_dispatch: | |
schedule: | |
# Runs the workflow every 2 hours | |
- cron: "0 */5 * * *" #"*/5 * * * *" | |
jobs: | |
fetch-issues: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Step 2: Set up Go | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20 | |
# Step 3: Install Dependencies | |
- name: Install dependencies | |
run: go mod tidy | |
# Step 4: Run the Go application | |
- name: Fetch Issues and Send Notifications | |
env: | |
GIT_TOKEN: ${{ secrets.GIT_TOKEN }} # Token for GitHub GraphQL API | |
EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }} # Email account username | |
WPRD_MAIL: ${{ secrets.WPRD_MAIL }} # Email account app password | |
SMTP_SERVER: "smtp.gmail.com" # Change for your email provider | |
SMTP_PORT: "587" # SMTP Port | |
REPO_OWNER: "Dharma-09" # Replace with target repo owner | |
REPO_NAME: "CI-CD-pipelines-examples" # Replace with target repo name | |
LABEL: "good-first-issue" # Replace with the desired label | |
RECEIVER_EMAIL: "[email protected]" # Replace with recipient email | |
run: | | |
go run main.go |