Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ DEFGUARD_DEFAULT_ADMIN_PASSWORD=pass123

### Proxy configuration ###
# Optional. URL of proxy gRPC server
# DEFGUARD_PROXY_URL: http://localhost:50051
# DEFGUARD_PROXY_URL=http://localhost:50051

### LDAP configuration ###
DEFGUARD_LDAP_URL=ldap://localhost:389
Expand Down
6 changes: 6 additions & 0 deletions .fpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-s dir
--name defguard
--architecture x86_64
--description "defguard core service"
--url "https://defguard.net/"
--maintainer "teonite"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
jobs:
test:
runs-on: [self-hosted, Linux]
container: rust:1.75
container: rust:1.77

services:
postgres:
Expand All @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: [self-hosted, Linux]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]
- name: Build container
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- name: Add SHORT_SHA env variable
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Deploy new image version
uses: actions-hub/kubectl@v1.26.3
uses: actions-hub/kubectl@v1.30.0
with:
args: --namespace defguard-dev set image deployment/defguard defguard=ghcr.io/defguard/defguard:sha-${{ env.SHORT_SHA }}
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
rustdoc:
runs-on: [self-hosted, Linux]
container: rust:1.75
container: rust:1.77
services:
postgres:
image: postgres:15-alpine
Expand All @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
test:
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]
- name: Login to GitHub container registry
Expand All @@ -21,12 +21,12 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: "./e2e/.nvmrc"
- name: Install pnpm
id: pnpm-install
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
Expand All @@ -36,7 +36,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
lint-e2e:
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 19
- name: install deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
lint-web:
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 19
- name: install deps
Expand Down
64 changes: 60 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: [self-hosted, Linux]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
config-inline: |
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]
- name: Login to GitHub container registry
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -108,10 +108,30 @@ jobs:
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
config-inline: |
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: ./web/pnpm-lock.yaml

- name: Install frontend dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
working-directory: web

- name: Build frontend
run: pnpm build
working-directory: web

- name: Build release binary
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -139,3 +159,39 @@ jobs:
asset_path: defguard-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_name: defguard-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_content_type: application/octet-stream

- name: Build DEB package
if: matrix.build == 'linux'
uses: bpicode/github-action-fpm@master
with:
fpm_args: "defguard-${{ github.ref_name }}-${{ matrix.target }}=/usr/bin/defguard defguard.service=/usr/lib/systemd/system/defguard.service .env=/etc/defguard/core.conf"
fpm_opts: "--debug --output-type deb --version ${{ env.VERSION }} --package defguard-${{ env.VERSION }}-${{ matrix.target }}.deb"

- name: Upload DEB
if: matrix.build == 'linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-${{ env.VERSION }}-${{ matrix.target }}.deb
asset_name: defguard-${{ env.VERSION }}-${{ matrix.target }}.deb
asset_content_type: application/octet-stream

- name: Build RPM package
if: matrix.build == 'linux'
uses: bpicode/github-action-fpm@master
with:
fpm_args: "defguard-${{ github.ref_name }}-${{ matrix.target }}=/usr/bin/defguard defguard.service=/usr/lib/systemd/system/defguard.service .env=/etc/defguard/core.conf"
fpm_opts: "--debug --output-type rpm --version ${{ env.VERSION }} --package defguard-${{ env.VERSION }}-${{ matrix.target }}.rpm"

- name: Upload RPM
if: matrix.build == 'linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-${{ env.VERSION }}-${{ matrix.target }}.rpm
asset_name: defguard-${{ env.VERSION }}-${{ matrix.target }}.rpm
asset_content_type: application/octet-stream

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading