| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599 |
- # ___ _ _
- # / _ \ | | (_)
- # | |_| | __ _ ___ _ __ | |_ _ ___
- # | _ |/ _` |/ _ \ '_ \| __| |/ __|
- # | | | | (_| | __/ | | | |_| | (__
- # \_| |_/\__, |\___|_| |_|\__|_|\___|
- # __/ |
- # _ _ |___/
- # | | | | / _| |
- # | | | | ___ _ __ _ __| |_| | _____ ____
- # | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
- # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
- # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
- #
- # This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.77.5). DO NOT EDIT.
- #
- # 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/
- #
- # Alternative regeneration methods:
- # make recompile
- #
- # Or use the gh-aw CLI directly:
- # ./gh-aw compile --validate --verbose
- #
- # The workflow is generated when any workflow uses the 'expires' field
- # in create-discussions, create-issues, or create-pull-request safe-outputs configuration.
- # Schedule frequency is automatically determined by the shortest expiration time.
- #
- name: Agentic Maintenance
- on:
- schedule:
- - cron: "37 0 * * *" # Daily (based on minimum expires: 30 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- - name: Setup Scripts
- uses: github/gh-aw-actions/setup@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- with:
- version: v0.77.5
- - 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
- run: echo "operation=${{ inputs.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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- sparse-checkout: |
- actions
- persist-credentials: false
- - name: Setup Scripts
- uses: github/gh-aw-actions/setup@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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
- run: echo "run_url=${{ inputs.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- - name: Setup Scripts
- uses: github/gh-aw-actions/setup@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- with:
- version: v0.77.5
- - 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- - name: Setup Scripts
- uses: github/gh-aw-actions/setup@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- with:
- version: v0.77.5
- - name: Restore activity report logs cache
- id: activity_report_logs_cache
- uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
- 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 100 \
- --output ./.cache/gh-aw/activity-report-logs \
- --format markdown \
- > ./.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- - name: Setup Scripts
- uses: github/gh-aw-actions/setup@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- with:
- version: v0.77.5
- - name: Restore forecast report logs cache
- id: forecast_report_logs_cache
- uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
- 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
- shell: bash
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GH_AW_CMD_PREFIX: gh aw
- run: |
- mkdir -p ./.cache/gh-aw/forecast
- ${GH_AW_CMD_PREFIX} logs --repo "${{ github.repository }}" --start-date -30d --count 1500 > /dev/null
- if ! compgen -G ".github/aw/logs/run-*/run_summary.json" > /dev/null; then
- echo "::error::Missing run summary cache in .github/aw/logs after gh aw logs warm-up; cannot run forecast."
- exit 1
- fi
- set +e
- ${GH_AW_CMD_PREFIX} forecast --repo "${{ github.repository }}" --timeout 10 --json 2> >(grep -Fv "forecast is an experimental command and may change without notice" >&2) > ./.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 10 minutes."}' > ./.cache/gh-aw/forecast/error.json
- echo "::error::Forecast computation timed out after 10 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: Save forecast report logs cache
- if: ${{ always() }}
- uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
- with:
- path: .github/aw/logs
- key: ${{ steps.forecast_report_logs_cache.outputs.cache-primary-key }}
- - 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
- - name: Setup Scripts
- uses: github/gh-aw-actions/setup@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- 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@3ea13c02d765410340d533515cb31a7eef2baaf0 # v0.77.5
- with:
- version: v0.77.5
- - 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();
|