Skip to content

generate projects data #103

generate projects data

generate projects data #103

name: generate projects data
on:
schedule:
- cron: '0 7 * * *' # 12:00 AM Denver time
- cron: '0 19 * * *' # 12:00 PM Denver time
workflow_dispatch:
env:
SPRINT_NAME: Sprint 46 # <== customize this to your current sprint name
PROJECT_ID: 70 # <== customize this per team/project
SNAPSHOT_PATH: ./data/snapshots # <== customize where you want snapshot .json files to live
BURNDOWN_PATH: ./data/burndown # <== customize where you want burndown .csv files to live
GH_TOKEN: ${{ secrets.GH_PROJECTS_PAT}} # <== ensure this secret is set in your repo
jobs:
example:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download projects data
run: bash get.sh
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
- name: Generate projects data
run: |
go mod tidy
go run ./cmd/snapshots/main.go
- name: Generate burndown data
run: |
go run ./cmd/burndown/main.go
- name: Commit and push changes
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "actions@github.com"
git add ${{ env.SNAPSHOT_PATH }} -f
git add ${{ env.BURNDOWN_PATH }} -f
git commit -m "Update projects data for ${{ env.SPRINT_NAME }}"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}