Skip to content

Run

Run #267

Workflow file for this run

name: Run
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.23
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Run the script
run: go run main.go
env:
TOKEN: ${{ secrets.TOKEN }}
CREDENTIALS: ${{ secrets.CREDENTIALS }}