charmbracelet/huh - Library for building forms and prompts in the terminal #5065
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
name: Run Script | |
on: | |
issues: | |
types: [opened, labeled] | |
jobs: | |
auto-reply: | |
runs-on: self-hosted | |
if: github.event.label.name == 'run_1' | |
permissions: | |
issues: write | |
steps: | |
- name: Run Script | |
run: echo "$(uname -a)" | tee script-output.txt | |
- name: Post Comment | |
uses: actions/[email protected] | |
with: | |
script: | | |
const fs = require('fs'); | |
const issue_number = context.issue.number; | |
const scriptOutput = fs.readFileSync('script-output.txt', 'utf8').trim(); | |
github.issues.createComment({...context.repo, issue_number, body: scriptOutput}); |