Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 20, 2025

Automates the process of initializing and compiling agentic workflow definitions via scheduled GitHub Actions workflow.

Implementation

Created .github/workflows/update-workflows.yml with:

  • Installation: Uses official install-gh-aw.sh script to install the gh aw CLI extension
  • Initialize & Compile: Executes gh aw init followed by gh aw compile
  • Auto-commit: Detects changes and commits them with github-actions[bot] identity
  • Scheduling: Runs weekly on Sundays at 00:23 UTC, with manual trigger support

Key Details

- name: Run gh aw init
  run: gh aw init
  
- name: Run gh aw compile
  run: gh aw compile

- name: Check for changes
  run: |
    if [[ -n $(git status --porcelain) ]]; then
      echo "changes=true" >> $GITHUB_OUTPUT
    fi

- name: Commit and push changes
  if: steps.check_changes.outputs.changes == 'true'
  run: |
    git config user.name "github-actions[bot]"
    git add .
    git commit -m "chore: update agentic workflows"
    git push

Workflow uses contents: write permission to enable pushing commits back to the repository. The gh CLI is pre-installed on GitHub Actions runners, so no additional installation is required. The cron schedule uses a randomized minute (23) to distribute load across GitHub Actions infrastructure.

Original prompt

Add update action workflow that install the gh aw cli, runs gh aw update and commits files if any changes.

gh extensions install githubnext/gh-aw
gh aw update
gh aw compile

then commit any changes


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Installs gh-aw extension using official installation script
- Runs gh aw update to update workflow definitions
- Runs gh aw compile to compile workflows
- Automatically commits and pushes any changes
- Scheduled to run weekly on Sundays
- Can be manually triggered via workflow_dispatch

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add update action workflow for gh aw cli Add automated workflow update action Dec 20, 2025
Copilot AI requested a review from pelikhan December 20, 2025 18:28
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install gh CLI (if not already installed)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove, always installed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the gh CLI installation step in commit 5038584.

- name: Verify gh-aw installation
run: gh aw version

- name: Run gh aw update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot run gh aw init instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to gh aw init in commit 5038584.

- Remove gh CLI installation step (always installed on runners)
- Replace 'gh aw update' with 'gh aw init'
- Update commit message to reflect gh aw init

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Changed from "0 0 * * 0" to "23 0 * * 0"
- Runs at 00:23 UTC instead of 00:00 UTC to avoid load spikes

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan December 20, 2025 18:56
@pelikhan pelikhan marked this pull request as ready for review December 20, 2025 19:02
@pelikhan pelikhan merged commit b27315a into main Dec 20, 2025
@pelikhan pelikhan deleted the copilot/add-update-action-workflow branch December 20, 2025 19:03
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