Skip to content

[X64] [EgorBo] CI test #5

[X64] [EgorBo] CI test

[X64] [EgorBo] CI test #5

Workflow file for this run

name: Run MihuBot script
on:
issues:
types: [opened]
jobs:
run-windows:
if: (github.actor == 'MihuBot' || github.actor == 'MihaZupan') && startsWith(github.event.issue.body, 'run-win-')
runs-on: windows-latest
steps:
- name: Run script
shell: pwsh
run: |
$githubActionUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.job }}'
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/json" https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --data "{`"body`":`"$githubActionUrl`""
$scriptId = ('${{ github.event.issue.body }}' -split '-')[2]
Invoke-WebRequest -Uri "https://mihubot.xyz/api/RunScript/?id=$scriptId" | Invoke-Expression