forked from go-gorm/sqlite
-
Notifications
You must be signed in to change notification settings - Fork 40
41 lines (35 loc) · 1.1 KB
/
badge-sqlite-version.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
31
32
33
34
35
36
37
38
39
40
41
name: Badge Sqlite version
on:
workflow_dispatch:
workflow_run:
workflows: ["GORM-tests"]
branches: [master]
types: [completed]
jobs:
create-sqlite-version-badge:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: go mod package cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-${{ hashFiles('go.mod') }}
- name: request sqlite_version()
run: echo "sqlite_version=$(go test . -run '^TestSQLiteVersion$' -v | grep sqlite_version | tr -s ' ' | cut -d' ' -f3)" >> $GITHUB_ENV
- name: Make version badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: fb4d23f63d866b3e1e58b26d2f5ed01f
filename: badge-sqlite-version.json
label: SQLite
message: "${{ env.sqlite_version }}"
color: 2269d3
style: for-the-badge
labelColor: 25292d