-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
42 lines (40 loc) · 1.53 KB
/
action.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
42
name: Build darkstat static assets
description: ""
inputs:
freelancer-folder:
description: Path to root of freelancer directory
default: ${{ github.workspace }}
# type: string
site-root:
description: Site root prefix to static assets
# type: string
default: "/"
heading:
description: Heading at the site rigit.
# type: string
default: 'fl-darkstat powered by <a href="https://github.com/darklab8/fl-darkstat">Github</a>'
runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Install Darkstat
shell: bash
run: |
git clone --depth 1 --branch $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/darklab8/fl-darkstat/releases/latest | sed "s/https:\/\/github.com\/darklab8\/fl-darkstat\/releases\/tag\///") https://github.com/darklab8/fl-darkstat.git
go install github.com/a-h/templ/cmd/templ@v0.2.543
cd fl-darkstat
echo $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/darklab8/fl-darkstat/releases/latest | sed "s/https:\/\/github.com\/darklab8\/fl-darkstat\/releases\/tag\///") > darkstat/settings/version.txt
templ generate
GOOS=linux go build -v -o main main.go
install -m 777 main /usr/local/bin/darkstat
cd ..
- name: build
shell: bash
run: darkstat build
env:
SITE_ROOT: ${{ inputs.site-root }}
FREELANCER_FOLDER: ${{ inputs.freelancer-folder }}
FLDARKSTAT_HEADING: ${{ inputs.heading }}