Last active
July 1, 2025 16:53
-
-
Save tobyapi/b402e86c76498c2e95db8eb0a2b39b90 to your computer and use it in GitHub Desktop.
任意 prompt を gemini に投げてから discord webhook に投げる gha
This file contains hidden or 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
| on: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| jobs: | |
| message: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| geminiResult: ${{ steps.set_output.outputs.value }} | |
| steps: | |
| - name: Deep Research by Gemini | |
| id: deep-research | |
| run: | | |
| echo 'GEMINI_RESULT<<EOF' >> $GITHUB_OUTPUT | |
| curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=${{ secrets.GEMINI_API_KEY }}" \ | |
| -H 'Content-Type: application/json' \ | |
| -X POST \ | |
| -d '{ | |
| "contents": [ | |
| { | |
| "parts": [ | |
| { | |
| "text": "${{ vars.GEMINI_PROMPT }}" | |
| } | |
| ] | |
| } | |
| ], | |
| "tools": [{"google_search": {}}] | |
| }' | jq -r .candidates[].content.parts[].text >> $GITHUB_OUTPUT | |
| echo EOF >> $GITHUB_OUTPUT | |
| - name: Discord Webhook Action | |
| uses: tsickert/[email protected] | |
| with: | |
| webhook-url: ${{ secrets.WEBHOOK_URL }} | |
| content: ${{ steps.deep-research.outputs.GEMINI_RESULT }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment