-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (25 loc) · 1.04 KB
/
run-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 }}