.Platform - Manage workflow issue #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow for creating issues for failing workflows | |
name: .Platform - Manage workflow issue | |
on: | |
schedule: | |
- cron: "30 5 * * *" # Every day at 5:30 am | |
workflow_dispatch: | |
jobs: | |
manage-issues: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: tibdex/github-app-token@v2 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.TEAM_LINTER_APP_ID }} | |
private_key: ${{ secrets.TEAM_LINTER_PRIVATE_KEY }} | |
- name: Manage issues | |
shell: pwsh | |
env: | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
run: | | |
# Load used functions | |
. (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'pipelines' 'platform' 'Set-AvmGithubIssueForWorkflow.ps1') | |
$functionInput = @{ | |
Repo = "${{ github.repository_owner }}/${{ github.event.repository.name }}" | |
RepoRoot = $env:GITHUB_WORKSPACE | |
LimitNumberOfRuns = 500 | |
LimitInDays = 2 | |
IgnoreWorkflows = @() | |
} | |
Write-Verbose "Invoke task with" -Verbose | |
Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose | |
Set-AvmGithubIssueForWorkflow @functionInput -Verbose # -WhatIf |