Run Build #111
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 Build | |
on: | |
schedule: | |
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | |
- cron: "0 0 * * 1" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- name: Run | |
id: run_hamcall | |
run: go run main.go -dl -m=b2 | |
env: | |
B2_KEYID: ${{ secrets.B2_KEYID }} | |
B2_APPKEY: ${{ secrets.B2_APPKEY }} | |
GEO_URL: ${{ secrets.GEO_URL }} | |
- name: Send workflow notification | |
run: | | |
curl -X POST --data-urlencode "payload={\"channel\": \"#hamcall\", \"username\": \"webhookbot\", \"text\": \"GitHub Action build result: ${{ job.status }}\n Updated ${{steps.run_hamcall.outputs.updated-records}} records in ${{steps.run_hamcall.outputs.run-time}}\n ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\", \"icon_emoji\": \":runner:\"}" ${{ secrets.SLACK_WEBHOOK }} |