Skip to content

Commit c1a054e

Browse files
committed
Open source 🎉
0 parents  commit c1a054e

File tree

9,797 files changed

+2305495
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,797 files changed

+2305495
-0
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
# Ignore build and test binaries.
3+
bin/
4+
testbin/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 🚀 Feature Request
2+
description: Request a new feature.
3+
title: "Feature: <title>"
4+
labels: [feature, triage]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Feature description
9+
description: Please provide a clear and concise description of what you want to happen and what problem will this solve.
10+
validations:
11+
required: true

.github/ISSUE_TEMPLATE/2-bug.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: 🐛 Bug
2+
description: Report a bug.
3+
title: "Bug: <title>"
4+
labels: [bug, triage]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: "## Description"
9+
10+
- type: textarea
11+
attributes:
12+
label: Please provide a clear and concise description of the issue you are experiencing with GuardLlama.
13+
validations:
14+
required: true
15+
16+
- type: markdown
17+
attributes:
18+
value: "## Steps to Reproduce"
19+
20+
- type: textarea
21+
attributes:
22+
label: Please provide the steps to reproduce the issue.
23+
placeholder: "1. Step 1\n2. Step 2\n3. Step 3 (and so on...)"
24+
validations:
25+
required: true
26+
27+
- type: markdown
28+
attributes:
29+
value: "## Expected Behavior"
30+
31+
- type: textarea
32+
attributes:
33+
label: Please describe the behavior you expected when performing the steps above.
34+
validations:
35+
required: true
36+
37+
- type: markdown
38+
attributes:
39+
value: "## Actual Behavior"
40+
41+
- type: textarea
42+
attributes:
43+
label: Please describe the actual behavior you observed when performing the steps above.
44+
validations:
45+
required: true
46+
47+
- type: markdown
48+
attributes:
49+
value: "## Additional Information"
50+
51+
- type: textarea
52+
attributes:
53+
label: Please provide any additional information or screenshots that might help us understand and resolve the issue.
54+
55+
- type: markdown
56+
attributes:
57+
value: "## GuardLlama Version"
58+
59+
- type: input
60+
attributes:
61+
label: Please provide the version of GuardLlama you are using.
62+
placeholder: "Get it with `glm-installer version`"
63+
validations:
64+
required: true
65+
66+
- type: markdown
67+
attributes:
68+
value: "## Server Environment"
69+
70+
- type: input
71+
attributes:
72+
label: OS
73+
placeholder: "e.g., Ubuntu 22.04"
74+
validations:
75+
required: true
76+
77+
- type: input
78+
attributes:
79+
label: Cloud Provider
80+
placeholder: "e.g., DigitalOcean"
81+
validations:
82+
required: true
83+
84+
- type: input
85+
attributes:
86+
label: VPN Client
87+
placeholder: "e.g., WireGuard for Mac"
88+
validations:
89+
required: true
90+
91+
- type: markdown
92+
attributes:
93+
value: "Thanks for taking the time to report this issue. We appreciate your help in improving GuardLlama!"

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true

.github/dependabot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Docs: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
commit-message:
11+
prefix: ".github:"
12+
13+
# Maintain dependencies for Go
14+
- package-ecosystem: "gomod"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
commit-message:
19+
prefix: "go.mod:"

.github/workflows/ci.yaml

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
tags-ignore:
7+
- 'v*'
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-go@v4
15+
with:
16+
go-version-file: go.mod
17+
check-latest: true
18+
- uses: subosito/flutter-action@v2
19+
with:
20+
channel: stable
21+
- name: Run build
22+
run: |
23+
make build build_with_tele
24+
test:
25+
name: Test
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: actions/setup-go@v4
30+
with:
31+
go-version-file: go.mod
32+
check-latest: true
33+
- name: Run tests
34+
run: |
35+
make test
36+
vet:
37+
name: Vet
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
- uses: actions/setup-go@v4
42+
with:
43+
go-version-file: go.mod
44+
check-latest: true
45+
- name: Run vet
46+
run: |
47+
make tools
48+
make vet
49+
e2etest:
50+
name: E2Etest
51+
needs: [build, test, vet]
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-go@v4
56+
with:
57+
go-version-file: go.mod
58+
check-latest: true
59+
- uses: subosito/flutter-action@v2
60+
with:
61+
channel: stable
62+
- name: Run e2etest
63+
run: |
64+
make tools
65+
make glm_install
66+
make e2etest
67+
docker:
68+
name: Docker
69+
needs: [e2etest]
70+
runs-on: ubuntu-latest
71+
if: github.ref == 'refs/heads/main'
72+
steps:
73+
- uses: actions/checkout@v3
74+
75+
- name: Generate build meta
76+
run: |
77+
echo "build_version=${GITHUB_SHA::6}" >> $GITHUB_ENV
78+
echo "build_date=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
79+
80+
- name: Set up Docker Buildx
81+
uses: docker/setup-buildx-action@v2
82+
83+
- name: Set up Docker QEMU
84+
uses: docker/setup-qemu-action@v2
85+
with:
86+
platforms: amd64,arm64
87+
88+
- name: Login to DockerHub
89+
uses: docker/login-action@v2
90+
with:
91+
registry: ghcr.io
92+
username: ${{ github.actor }}
93+
password: ${{ secrets.GITHUB_TOKEN }}
94+
95+
- name: Docker meta
96+
id: meta
97+
uses: docker/metadata-action@v4
98+
with:
99+
images: |
100+
ghcr.io/guardllamanet/glmmgr
101+
ghcr.io/guardllamanet/glmmgr-wg
102+
103+
# build flutter assets
104+
- uses: subosito/flutter-action@v2
105+
with:
106+
channel: stable
107+
- name: Run Flutter build
108+
run: |
109+
make internal/web/ui/dist/flutter.js
110+
111+
- name: Docker push
112+
uses: docker/bake-action@v2
113+
with:
114+
push: true
115+
pull: true
116+
targets: all
117+
files: |
118+
./docker-bake.hcl
119+
${{ steps.meta.outputs.bake-file }}
120+
set: |
121+
mgr.tags=ghcr.io/guardllamanet/glmmgr:main
122+
wg.tags=ghcr.io/guardllamanet/glmmgr-wg:main
123+
*.args.BUILD_VERSION=${{ env.build_version }}
124+
*.args.BUILD_DATE=${{ env.build_date }}
125+
*.platform=linux/arm64,linux/amd64
126+
*.cache-from=type=gha
127+
*.cache-to=type=gha,mode=max
128+
129+
installer_test:
130+
name: Installer Test
131+
needs: [docker]
132+
runs-on: ubuntu-latest
133+
if: github.ref == 'refs/heads/main'
134+
steps:
135+
- uses: actions/checkout@v3
136+
- uses: actions/setup-go@v4
137+
with:
138+
go-version-file: go.mod
139+
check-latest: true
140+
- uses: subosito/flutter-action@v2
141+
with:
142+
channel: stable
143+
- name: Run installer test
144+
run: |
145+
make installer_test

.github/workflows/release.yaml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
jobs:
7+
goreleaser:
8+
name: GoReleaser
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
- name: Set up Go
14+
uses: actions/setup-go@v4
15+
with:
16+
go-version-file: go.mod
17+
check-latest: true
18+
- uses: subosito/flutter-action@v2
19+
with:
20+
channel: stable
21+
- name: Generate tag name
22+
run: |
23+
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
24+
- name: Run GoReleaser
25+
uses: goreleaser/goreleaser-action@v4
26+
with:
27+
version: v1.15.2
28+
args: release --clean
29+
env:
30+
# Use the machine token to publish
31+
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
32+
GORELEASER_CURRENT_TAG: ${{env.tag_name}}
33+
TELE_SERVER_USERNAME: ${{ secrets.TELE_SERVER_USERNAME }}
34+
TELE_SERVER_PASSWORD: ${{ secrets.TELE_SERVER_PASSWORD }}
35+
- name: Upload install script
36+
env:
37+
GITHUB_TOKEN: ${{secrets.CI_GITHUB_TOKEN}}
38+
GORELEASER_CURRENT_TAG: ${{ env.tag_name }}
39+
run: |
40+
gh release upload ${GORELEASER_CURRENT_TAG} $PWD/install.sh -R guardllamanet/release --clobber
41+
docker:
42+
name: Docker
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Generate build meta
48+
run: |
49+
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
50+
echo "build_date=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
51+
52+
- name: Set up Docker Buildx
53+
uses: docker/setup-buildx-action@v2
54+
55+
- name: Set up Docker QEMU
56+
uses: docker/setup-qemu-action@v2
57+
with:
58+
platforms: amd64,arm64
59+
60+
- name: Login to DockerHub
61+
uses: docker/login-action@v2
62+
with:
63+
registry: ghcr.io
64+
username: ${{ github.actor }}
65+
password: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Docker meta
68+
id: meta
69+
uses: docker/metadata-action@v4
70+
with:
71+
images: |
72+
ghcr.io/guardllamanet/glmmgr
73+
ghcr.io/guardllamanet/glmmgr-wg
74+
75+
# build flutter assets
76+
- uses: subosito/flutter-action@v2
77+
with:
78+
channel: stable
79+
- name: Run Flutter build
80+
run: |
81+
make internal/web/ui/dist/flutter.js
82+
83+
- name: Docker push
84+
uses: docker/bake-action@v2
85+
with:
86+
push: true
87+
pull: true
88+
targets: all
89+
files: |
90+
./docker-bake.hcl
91+
${{ steps.meta.outputs.bake-file }}
92+
set: |
93+
mgr.tags=ghcr.io/guardllamanet/glmmgr:latest
94+
wg.tags=ghcr.io/guardllamanet/glmmgr-wg:latest
95+
mgr.tags=ghcr.io/guardllamanet/glmmgr:${{ env.tag_name }}
96+
wg.tags=ghcr.io/guardllamanet/glmmgr-wg:${{ env.tag_name }}
97+
*.args.BUILD_VERSION=${{ env.tag_name }}
98+
*.args.BUILD_DATE=${{ env.build_date }}
99+
*.platform=linux/arm64,linux/amd64
100+
*.cache-from=type=gha
101+
*.cache-to=type=gha,mode=max

0 commit comments

Comments
 (0)