Skip to content

feat: add automated workflows for flake and package updates#1

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-cron-github-actions
Draft

feat: add automated workflows for flake and package updates#1
Copilot wants to merge 3 commits intomainfrom
copilot/add-cron-github-actions

Conversation

Copy link

Copilot AI commented Jan 30, 2026

Adds two scheduled GitHub Actions workflows to automate dependency and package updates with PR creation.

Workflows

update-flake.yml

  • Runs nix flake update weekly (Monday 00:00 UTC)
  • Creates PR when flake.lock changes
  • Uses cachix/install-nix-action@v27 with flakes enabled

update-pkgs.yml

  • Auto-discovers and updates all RKE2 versions via existing update-script.sh
  • Runs weekly (Monday 02:00 UTC)
  • Bash strict mode (set -euo pipefail) with failure tracking
  • Continues on partial failures, creates PR for successful updates

Implementation Details

Both workflows:

  • Check for changes before creating PR (no empty PRs)
  • Use peter-evans/create-pull-request@v6 for automation
  • Support manual trigger via workflow_dispatch
  • Auto-label PRs (automated, dependencies, packages)
  • Clean up branches after merge

Example PR creation logic:

- name: Check for changes
  id: check_changes
  run: |
    if git diff --quiet flake.lock; then
      echo "changed=false" >> $GITHUB_OUTPUT
    else
      echo "changed=true" >> $GITHUB_OUTPUT
    fi

- name: Create Pull Request
  if: steps.check_changes.outputs.changed == 'true'
  uses: peter-evans/create-pull-request@v6
Original prompt

Add two cron github action, one automatically update flake, the other automatically update pkgs. Create PR when pkgs or flake is updated.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 30, 2026 09:23
Co-authored-by: sunziping2016 <8998546+sunziping2016@users.noreply.github.com>
Co-authored-by: sunziping2016 <8998546+sunziping2016@users.noreply.github.com>
Copilot AI changed the title [WIP] Add cron GitHub actions for automatic updates feat: add automated workflows for flake and package updates Jan 30, 2026
Copilot AI requested a review from sunziping2016 January 30, 2026 09:29
@sunziping2016 sunziping2016 force-pushed the main branch 21 times, most recently from eadd5e6 to afa50de Compare February 10, 2026 17:05
@sunziping2016 sunziping2016 force-pushed the main branch 9 times, most recently from af83353 to 05b4ea6 Compare February 21, 2026 19:22
@sunziping2016 sunziping2016 force-pushed the main branch 21 times, most recently from 811a0c8 to e451479 Compare March 2, 2026 16:58
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

Successfully merging this pull request may close these issues.

2 participants