Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create workflow to fetch puzzle #4

Open
brendanator opened this issue Jan 1, 2025 · 0 comments
Open

Create workflow to fetch puzzle #4

brendanator opened this issue Jan 1, 2025 · 0 comments

Comments

@brendanator
Copy link
Contributor

  • Create GitHub workflow called fetch-puzzle.yml to fetch advent of code puzzles
  • Trigger it:
    • cron - 5pm UTC between 1-25 December (12 hours after the puzzle is published)
    • workflow_dispatch - taking year and day as arguments
  • Set env vars
    • AOC_SESSION: secrets.AOC_SESSION
  • Add permissions needed: content, issues
  • Set up
    • Check out repo - uses: actions/checkout@v4
    • Setup uv - uses astral-sh/setup-uv@v4 and uv sync
  • Download the puzzle
    • Run uv run advent_of_code.py download {year} {day} and store the stdout as the part in $GITHUB_OUTPUT
  • Commit and push puzzle in puzzles/year_{year}/day_{day} with user GitHub Actions
  • Trigger create-puzzle-issue.yml using the year, day and part 2 as strings
    • uses: sourcery-ai/autonomous-advent-of-code/.github/workflows/create-puzzle-issue.yml@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant