mirror of
https://github.com/Z3Prover/z3
synced 2026-06-26 10:28:48 +00:00
Bumps [actions/cache/restore](https://github.com/actions/cache) from 5.0.5 to 6.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache/restore's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update packages, migrate to ESM by <a href="https://github.com/Samirat"><code>@Samirat</code></a> in <a href="https://redirect.github.com/actions/cache/pull/1760">actions/cache#1760</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/cache/compare/v5...v6.0.0">https://github.com/actions/cache/compare/v5...v6.0.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache/restore's changelog</a>.</em></p> <blockquote> <h1>Releases</h1> <h2>How to prepare a release</h2> <blockquote> <p>[!NOTE] Relevant for maintainers with write access only.</p> </blockquote> <ol> <li>Switch to a new branch from <code>main</code>.</li> <li>Run <code>npm test</code> to ensure all tests are passing.</li> <li>Update the version in <a href="https://github.com/actions/cache/blob/main/package.json"><code>https://github.com/actions/cache/blob/main/package.json</code></a>.</li> <li>Run <code>npm run build</code> to update the compiled files.</li> <li>Update this <a href="https://github.com/actions/cache/blob/main/RELEASES.md"><code>https://github.com/actions/cache/blob/main/RELEASES.md</code></a> with the new version and changes in the <code>## Changelog</code> section.</li> <li>Run <code>licensed cache</code> to update the license report.</li> <li>Run <code>licensed status</code> and resolve any warnings by updating the <a href="https://github.com/actions/cache/blob/main/.licensed.yml"><code>https://github.com/actions/cache/blob/main/.licensed.yml</code></a> file with the exceptions.</li> <li>Commit your changes and push your branch upstream.</li> <li>Open a pull request against <code>main</code> and get it reviewed and merged.</li> <li>Draft a new release <a href="https://github.com/actions/cache/releases">https://github.com/actions/cache/releases</a> use the same version number used in <code>package.json</code> <ol> <li>Create a new tag with the version number.</li> <li>Auto generate release notes and update them to match the changes you made in <code>RELEASES.md</code>.</li> <li>Toggle the set as the latest release option.</li> <li>Publish the release.</li> </ol> </li> <li>Navigate to <a href="https://github.com/actions/cache/actions/workflows/release-new-action-version.yml">https://github.com/actions/cache/actions/workflows/release-new-action-version.yml</a> <ol> <li>There should be a workflow run queued with the same version number.</li> <li>Approve the run to publish the new version and update the major tags for this action.</li> </ol> </li> </ol> <h2>Changelog</h2> <h3>6.1.0</h3> <ul> <li>Bump <code>@actions/cache</code> to v6.1.0 to pick up <a href="https://redirect.github.com/actions/toolkit/pull/2435">actions/toolkit#2435 Handle cache write error due to read-only token</a></li> <li>Switch redundant "Cache save failed" warning to debug log in save-only</li> </ul> <h3>6.0.0</h3> <ul> <li>Updated <code>@actions/cache</code> to ^6.0.1, <code>@actions/core</code> to ^3.0.1, <code>@actions/exec</code> to ^3.0.0, <code>@actions/io</code> to ^3.0.2</li> <li>Migrated to ESM module system</li> <li>Upgraded Jest to v30 and test infrastructure to be ESM compatible</li> </ul> <h3>5.0.4</h3> <ul> <li>Bump <code>minimatch</code> to v3.1.5 (fixes ReDoS via globstar patterns)</li> <li>Bump <code>undici</code> to v6.24.1 (WebSocket decompression bomb protection, header validation fixes)</li> <li>Bump <code>fast-xml-parser</code> to v5.5.6</li> </ul> <h3>5.0.3</h3> <ul> <li>Bump <code>@actions/cache</code> to v5.0.5 (Resolves: <a href="https://github.com/actions/cache/security/dependabot/33">https://github.com/actions/cache/security/dependabot/33</a>)</li> <li>Bump <code>@actions/core</code> to v2.0.3</li> </ul> <h3>5.0.2</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="2c8a9bd745"><code>2c8a9bd</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1760">#1760</a> from actions/samirat/esm_migration_and_package_update</li> <li><a href="e9b91fdc3f"><code>e9b91fd</code></a> Prettier fixes</li> <li><a href="e4884b8ff7"><code>e4884b8</code></a> Rebuild dist</li> <li><a href="10baf0191a"><code>10baf01</code></a> Fixed licenses</li> <li><a href="e39b386c90"><code>e39b386</code></a> Fix test mock return order</li> <li><a href="b692820337"><code>b692820</code></a> PR feedback</li> <li><a href="60749128a4"><code>6074912</code></a> Rebuild dist bundles as ESM to match type:module</li> <li><a href="5a912e8b4a"><code>5a912e8</code></a> Fix lint and jest issues</li> <li><a href="b9bf592b98"><code>b9bf592</code></a> Update documentation for v6 release</li> <li><a href="80f777761d"><code>80f7777</code></a> Update packages, migrate to ESM</li> <li>See full diff in <a href="27d5ce7f10...2c8a9bd745">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
614 lines
26 KiB
YAML
614 lines
26 KiB
YAML
# This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.80.9). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
|
|
#
|
|
# ___ _ _
|
|
# / _ \ | | (_)
|
|
# | |_| | __ _ ___ _ __ | |_ _ ___
|
|
# | _ |/ _` |/ _ \ '_ \| __| |/ __|
|
|
# | | | | (_| | __/ | | | |_| | (__
|
|
# \_| |_/\__, |\___|_| |_|\__|_|\___|
|
|
# __/ |
|
|
# _ _ |___/
|
|
# | | | | / _| |
|
|
# | | | | ___ _ __ _ __| |_| | _____ ____
|
|
# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
|
|
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
|
|
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
|
|
#
|
|
#
|
|
# To regenerate this workflow, run:
|
|
# gh aw compile
|
|
# Not all edits will cause changes to this file.
|
|
#
|
|
# For more information: https://github.github.com/gh-aw/introduction/overview/
|
|
#
|
|
# This file defines the generated agentic maintenance workflow for this repository.
|
|
# It runs scheduled cleanup for expiring safe outputs and supports manual maintenance operations.
|
|
#
|
|
# This workflow is generated automatically when workflows use expiring safe outputs
|
|
# or when repository maintenance features are enabled in .github/workflows/aw.json.
|
|
#
|
|
# To disable maintenance workflow generation, set in .github/workflows/aw.json:
|
|
# {"maintenance": false}
|
|
#
|
|
# Agentic maintenance docs:
|
|
# https://github.github.com/gh-aw/reference/ephemerals/#manual-maintenance-operations
|
|
#
|
|
name: Agentic Maintenance
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "37 0 * * *" # Daily (based on minimum expires: 7 days)
|
|
workflow_dispatch:
|
|
inputs:
|
|
operation:
|
|
description: 'Optional maintenance operation to run'
|
|
required: false
|
|
type: choice
|
|
default: ''
|
|
options:
|
|
- ''
|
|
- 'disable'
|
|
- 'enable'
|
|
- 'update'
|
|
- 'upgrade'
|
|
- 'safe_outputs'
|
|
- 'create_labels'
|
|
- 'activity_report'
|
|
- 'close_agentic_workflows_issues'
|
|
- 'clean_cache_memories'
|
|
- 'update_pull_request_branches'
|
|
- 'validate'
|
|
- 'forecast'
|
|
run_url:
|
|
description: 'Run URL or run ID to replay safe outputs from (e.g. https://github.com/owner/repo/actions/runs/12345 or 12345). Required when operation is safe_outputs.'
|
|
required: false
|
|
type: string
|
|
default: ''
|
|
workflow_call:
|
|
inputs:
|
|
operation:
|
|
description: 'Optional maintenance operation to run (disable, enable, update, upgrade, safe_outputs, create_labels, activity_report, close_agentic_workflows_issues, clean_cache_memories, update_pull_request_branches, validate, forecast)'
|
|
required: false
|
|
type: string
|
|
default: ''
|
|
run_url:
|
|
description: 'Run URL or run ID to replay safe outputs from (e.g. https://github.com/owner/repo/actions/runs/12345 or 12345). Required when operation is safe_outputs.'
|
|
required: false
|
|
type: string
|
|
default: ''
|
|
outputs:
|
|
operation_completed:
|
|
description: 'The maintenance operation that was completed (empty when none ran or a scheduled job ran)'
|
|
value: ${{ jobs.run_operation.outputs.operation || inputs.operation }}
|
|
applied_run_url:
|
|
description: 'The run URL that safe outputs were applied from'
|
|
value: ${{ jobs.apply_safe_outputs.outputs.run_url }}
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
close-expired-entities:
|
|
if: ${{ (!(github.event.repository.fork)) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
discussions: write
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Close expired discussions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_discussions.cjs');
|
|
await main();
|
|
|
|
- name: Close expired issues
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_issues.cjs');
|
|
await main();
|
|
|
|
- name: Close expired pull requests
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_pull_requests.cjs');
|
|
await main();
|
|
|
|
cleanup-cache-memory:
|
|
if: ${{ (!(github.event.repository.fork)) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '' || inputs.operation == 'clean_cache_memories') }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
actions: write
|
|
steps:
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Cleanup outdated cache-memory entries
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/cleanup_cache_memory.cjs');
|
|
await main();
|
|
|
|
run_operation:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation != '' && inputs.operation != 'safe_outputs' && inputs.operation != 'create_labels' && inputs.operation != 'activity_report' && inputs.operation != 'close_agentic_workflows_issues' && inputs.operation != 'clean_cache_memories' && inputs.operation != 'update_pull_request_branches' && inputs.operation != 'validate' && inputs.operation != 'forecast' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
actions: write
|
|
contents: write
|
|
pull-requests: write
|
|
outputs:
|
|
operation: ${{ steps.record.outputs.operation }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Install gh-aw
|
|
uses: github/gh-aw-actions/setup-cli@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
version: v0.80.9
|
|
|
|
- name: Run operation
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GH_AW_OPERATION: ${{ inputs.operation }}
|
|
GH_AW_CMD_PREFIX: gh aw
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/run_operation_update_upgrade.cjs');
|
|
await main();
|
|
|
|
- name: Record outputs
|
|
id: record
|
|
env:
|
|
GH_AW_OPERATION: ${{ inputs.operation }}
|
|
run: echo "operation=$GH_AW_OPERATION" >> "$GITHUB_OUTPUT"
|
|
|
|
update_pull_request_branches:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'update_pull_request_branches' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Update pull request branches
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/update_pull_request_branches.cjs');
|
|
await main();
|
|
|
|
apply_safe_outputs:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'safe_outputs' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
actions: read
|
|
contents: write
|
|
discussions: write
|
|
issues: write
|
|
pull-requests: write
|
|
outputs:
|
|
run_url: ${{ steps.record.outputs.run_url }}
|
|
steps:
|
|
- name: Checkout actions folder
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
sparse-checkout: |
|
|
actions
|
|
persist-credentials: false
|
|
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Apply Safe Outputs
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GH_AW_RUN_URL: ${{ inputs.run_url }}
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/apply_safe_outputs_replay.cjs');
|
|
await main();
|
|
|
|
- name: Record outputs
|
|
id: record
|
|
env:
|
|
GH_AW_RUN_URL: ${{ inputs.run_url }}
|
|
run: echo "run_url=$GH_AW_RUN_URL" >> "$GITHUB_OUTPUT"
|
|
|
|
create_labels:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'create_labels' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Install gh-aw
|
|
uses: github/gh-aw-actions/setup-cli@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
version: v0.80.9
|
|
|
|
- name: Create missing labels
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
GH_AW_CMD_PREFIX: gh aw
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/create_labels.cjs');
|
|
await main();
|
|
|
|
activity_report:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'activity_report' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
timeout-minutes: 120
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Install gh-aw
|
|
uses: github/gh-aw-actions/setup-cli@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
version: v0.80.9
|
|
|
|
- name: Restore activity report logs cache
|
|
id: activity_report_logs_cache
|
|
uses: actions/cache/restore@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
|
with:
|
|
path: ./.cache/gh-aw/activity-report-logs
|
|
key: ${{ runner.os }}-activity-report-logs-${{ github.repository }}-${{ github.ref_name }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
${{ runner.os }}-activity-report-logs-${{ github.repository }}-
|
|
${{ runner.os }}-activity-report-logs-
|
|
- name: Download activity report logs
|
|
timeout-minutes: 20
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GH_AW_CMD_PREFIX: gh aw
|
|
run: |
|
|
${GH_AW_CMD_PREFIX} logs \
|
|
--repo "${{ github.repository }}" \
|
|
--start-date -1w \
|
|
--count 500 \
|
|
--output ./.cache/gh-aw/activity-report-logs \
|
|
--format markdown \
|
|
--report-file ./.cache/gh-aw/activity-report-logs/report.md
|
|
|
|
- name: Save activity report logs cache
|
|
if: ${{ always() }}
|
|
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: ./.cache/gh-aw/activity-report-logs
|
|
key: ${{ steps.activity_report_logs_cache.outputs.cache-primary-key }}
|
|
|
|
- name: Generate activity report issue
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const fs = require('node:fs');
|
|
const reportPath = './.cache/gh-aw/activity-report-logs/report.md';
|
|
if (!fs.existsSync(reportPath)) {
|
|
core.warning('Activity report markdown not found at ' + reportPath + '; skipping issue creation.');
|
|
return;
|
|
}
|
|
let reportBody = '';
|
|
try {
|
|
reportBody = fs.readFileSync(reportPath, 'utf8').trim();
|
|
} catch (error) {
|
|
core.warning('Failed to read activity report markdown at ' + reportPath + ': ' + error.message);
|
|
return;
|
|
}
|
|
if (!reportBody) {
|
|
core.warning('Activity report markdown is empty at ' + reportPath + '; skipping issue creation.');
|
|
return;
|
|
}
|
|
const repoSlug = context.repo.owner + '/' + context.repo.repo;
|
|
const body = [
|
|
'### Agentic workflow activity report',
|
|
'',
|
|
'Repository: ' + repoSlug,
|
|
'Generated at: ' + new Date().toISOString(),
|
|
'',
|
|
reportBody,
|
|
].join('\n');
|
|
const createdIssue = await github.rest.issues.create({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
title: '[aw] agentic status report',
|
|
body,
|
|
labels: ['agentic-workflows'],
|
|
});
|
|
core.info('Created issue #' + createdIssue.data.number + ': ' + createdIssue.data.html_url);
|
|
|
|
forecast_report:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'forecast' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
timeout-minutes: 60
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Install gh-aw
|
|
uses: github/gh-aw-actions/setup-cli@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
version: v0.80.9
|
|
|
|
- name: Restore forecast report logs cache
|
|
id: forecast_report_logs_cache
|
|
uses: actions/cache/restore@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
|
with:
|
|
path: ./.github/aw/logs
|
|
key: ${{ runner.os }}-forecast-report-logs-${{ github.repository }}-${{ github.ref_name }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
${{ runner.os }}-forecast-report-logs-${{ github.repository }}-
|
|
${{ runner.os }}-forecast-report-logs-
|
|
|
|
- name: Generate forecast report
|
|
id: generate_forecast_report
|
|
timeout-minutes: 30
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
DEBUG: "*"
|
|
GH_AW_CMD_PREFIX: gh aw
|
|
run: |
|
|
mkdir -p ./.cache/gh-aw/forecast
|
|
set +e
|
|
${GH_AW_CMD_PREFIX} forecast --repo "${{ github.repository }}" --timeout 30 --verbose --json > ./.cache/gh-aw/forecast/report.json
|
|
forecast_exit_code=$?
|
|
set -e
|
|
if [ "${forecast_exit_code}" -eq 124 ]; then
|
|
echo '{"outcome":"timeout","message":"Forecast computation timed out after 30 minutes."}' > ./.cache/gh-aw/forecast/error.json
|
|
echo "::error::Forecast computation timed out after 30 minutes."
|
|
exit 1
|
|
fi
|
|
if [ "${forecast_exit_code}" -ne 0 ]; then
|
|
echo '{"outcome":"error","message":"Forecast computation failed before producing a report."}' > ./.cache/gh-aw/forecast/error.json
|
|
echo "::error::Forecast computation failed with exit code ${forecast_exit_code}."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Debug forecast logs folder
|
|
if: ${{ always() }}
|
|
shell: bash
|
|
run: |
|
|
if [ ! -d ./.github/aw/logs ]; then
|
|
echo "Logs directory not found: ./.github/aw/logs"
|
|
exit 0
|
|
fi
|
|
echo "Files under ./.github/aw/logs:"
|
|
find ./.github/aw/logs -type f | sort
|
|
|
|
- name: Save forecast report logs cache
|
|
if: ${{ always() }}
|
|
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: ./.github/aw/logs
|
|
key: ${{ runner.os }}-forecast-report-logs-${{ github.repository }}-${{ github.ref_name }}-${{ github.run_id }}
|
|
|
|
- name: Generate forecast issue
|
|
if: ${{ always() }}
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
FORECAST_STEP_OUTCOME: ${{ steps.generate_forecast_report.outcome }}
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/create_forecast_issue.cjs');
|
|
await main();
|
|
|
|
close_agentic_workflows_issues:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'close_agentic_workflows_issues' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-slim
|
|
permissions:
|
|
issues: write
|
|
steps:
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Close no-repro agentic-workflows issues
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_agentic_workflows_issues.cjs');
|
|
await main();
|
|
|
|
validate_workflows:
|
|
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'validate' && (!(github.event.repository.fork)) }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Scripts
|
|
uses: github/gh-aw-actions/setup@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
destination: ${{ runner.temp }}/gh-aw/actions
|
|
|
|
- name: Check admin/maintainer permissions
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
|
|
await main();
|
|
|
|
- name: Install gh-aw
|
|
uses: github/gh-aw-actions/setup-cli@8c7d04ebf1ece56cd381446125da3e0f6896294a # v0.80.9
|
|
with:
|
|
version: v0.80.9
|
|
|
|
- name: Validate workflows and file issue on findings
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
env:
|
|
GH_AW_CMD_PREFIX: gh aw
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
const { main } = require('${{ runner.temp }}/gh-aw/actions/run_validate_workflows.cjs');
|
|
await main();
|