Check and send message #552
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: Check and send message | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/configure-pages@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- name: Fetch and Send Message | |
run: | | |
mkdir out | |
go run . > out/fgi_output.json | |
cd out | |
cat fgi_output.json | |
tar -czf fgi_output.tar.gz fgi_output.json | |
env: | |
TELEGRAM_APITOKEN: ${{ secrets.TELEGRAM_APITOKEN }} | |
CHATID: ${{ secrets.CHATID }} | |
RAPIDAPI_KEY: ${{ secrets.RAPIDAPI_KEY }} | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'out/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |