Skip to content

Commit ad5669f

Browse files
committed
Merge branch 'release/1.5-alpha' of github.com:DefGuard/defguard into build_alpine
2 parents 6ae9172 + b3059c5 commit ad5669f

File tree

158 files changed

+5700
-2839
lines changed

Some content is hidden

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

158 files changed

+5700
-2839
lines changed

.github/workflows/build-docker.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- self-hosted
2222
- Linux
2323
- ${{ matrix.runner }}
24+
2425
strategy:
2526
matrix:
2627
# cpu: [arm64, amd64, arm/v7]
@@ -35,23 +36,31 @@ jobs:
3536
# - cpu: arm/v7
3637
# runner: ARM
3738
# tag: armv7
39+
40+
permissions:
41+
contents: read
42+
packages: write
43+
3844
steps:
3945
- name: Checkout
4046
uses: actions/checkout@v4
4147
with:
4248
submodules: recursive
49+
4350
- name: Login to GitHub container registry
4451
uses: docker/login-action@v3
4552
with:
4653
registry: ghcr.io
4754
username: ${{ github.actor }}
4855
password: ${{ secrets.GITHUB_TOKEN }}
56+
4957
- name: Set up Docker Buildx
5058
uses: docker/setup-buildx-action@v3
5159
with:
5260
buildkitd-config-inline: |
5361
[registry."docker.io"]
5462
mirrors = ["dockerhub-proxy.teonite.net"]
63+
5564
- name: Build container
5665
uses: docker/build-push-action@v6
5766
with:
@@ -65,8 +74,18 @@ jobs:
6574

6675
docker-manifest:
6776
runs-on: [self-hosted, Linux]
77+
78+
permissions:
79+
contents: read
80+
packages: write
81+
id-token: write # needed for signing the images with GitHub OIDC Token
82+
6883
needs: [build-docker]
84+
6985
steps:
86+
- name: Install Cosign
87+
uses: sigstore/[email protected]
88+
7089
- name: Docker meta
7190
id: meta
7291
uses: docker/metadata-action@v5
@@ -75,12 +94,14 @@ jobs:
7594
${{ env.GHCR_REPO }}
7695
flavor: ${{ inputs.flavor }}
7796
tags: ${{ inputs.tags }}
97+
7898
- name: Login to GitHub container registry
7999
uses: docker/login-action@v3
80100
with:
81101
registry: ghcr.io
82102
username: ${{ github.actor }}
83103
password: ${{ secrets.GITHUB_TOKEN }}
104+
84105
- name: Create and push manifests
85106
run: |
86107
tags='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}'
@@ -90,4 +111,14 @@ jobs:
90111
docker manifest create ${tag} ${{ env.GHCR_REPO }}:${{ github.sha }}-amd64 ${{ env.GHCR_REPO }}:${{ github.sha }}-arm64
91112
docker manifest push ${tag}
92113
done
93-
# ${{ env.GHCR_REPO }}:${{ github.sha }}-armv7
114+
115+
- name: Sign the images with GitHub OIDC Token
116+
run: |
117+
images='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}'
118+
cosign sign --yes ${images}
119+
120+
- name: Verify image signatures
121+
run: |
122+
images='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}'
123+
cosign verify ${images} --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp="https://github.com/DefGuard/defguard" -o text
124+

.github/workflows/ci.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ on:
2020

2121
jobs:
2222
test:
23-
runs-on: [self-hosted, Linux, X64]
24-
container: rust:1
23+
runs-on:
24+
- codebuild-defguard-core-runner-${{ github.run_id }}-${{ github.run_attempt }}
25+
26+
container: public.ecr.aws/docker/library/rust:1
2527

2628
services:
2729
postgres:
@@ -52,21 +54,30 @@ jobs:
5254
uses: actions/checkout@v4
5355
with:
5456
submodules: recursive
57+
5558
- name: Cache
5659
uses: Swatinem/rust-cache@v2
60+
5761
- name: Install protoc
5862
run: apt-get update && apt-get -y install protobuf-compiler
63+
5964
- name: Check format
6065
run: |
6166
rustup component add rustfmt
6267
cargo fmt -- --check
68+
6369
- name: Run clippy linter
6470
run: |
6571
rustup component add clippy
6672
cargo clippy --all-targets --all-features -- -D warnings
73+
6774
- name: Run cargo deny
68-
uses: EmbarkStudios/cargo-deny-action@v2
75+
run: |
76+
cargo install cargo-deny
77+
cargo deny check
78+
6979
- name: Install nextest
7080
uses: taiki-e/install-action@nextest
81+
7182
- name: Run tests
7283
run: cargo nextest run --locked --no-fail-fast

.github/workflows/lint-web.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ on:
44
- main
55
- dev
66
- 'release/**'
7-
paths:
8-
- "web/**"
7+
paths-ignore:
8+
- "*.md"
9+
- "LICENSE"
910
pull_request:
1011
branches:
1112
- main
1213
- dev
1314
- 'release/**'
14-
paths:
15-
- "web/**"
15+
paths-ignore:
16+
- "*.md"
17+
- "LICENSE"
1618

1719
jobs:
1820
lint-web:
19-
runs-on: [self-hosted, Linux, X64]
21+
runs-on:
22+
- codebuild-defguard-core-runner-${{ github.run_id }}-${{ github.run_attempt }}
23+
2024
steps:
2125
- uses: actions/checkout@v4
2226
with:

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ jobs:
5353

5454
build-binaries:
5555
needs: [create-release]
56+
5657
runs-on:
5758
- self-hosted
5859
- Linux
5960
- X64
61+
6062
strategy:
6163
fail-fast: false
6264
matrix:
@@ -71,6 +73,10 @@ jobs:
7173
- build: freebsd
7274
arch: amd64
7375
target: x86_64-unknown-freebsd
76+
77+
permissions:
78+
contents: write # needed to upload release assets
79+
7480
steps:
7581
# Store the version, stripping any v-prefix
7682
- name: Write release version
@@ -165,7 +171,7 @@ jobs:
165171
- name: Build AMI images for multiple regions
166172
if: matrix.build == 'linux' && matrix.arch == 'amd64'
167173
run: |
168-
regions=(us-east-1 eu-west-1 ap-northeast-1)
174+
regions=(us-east-1 eu-west-1 ap-northeast-1 eu-central-1)
169175
for region in "${regions[@]}"; do
170176
echo "Building AMI for region: $region"
171177
echo "Running packer validate for $region..."

.sqlx/query-770fcf951f69a40e2e9833486425dc105a0411bd634a080391e41f431f966c17.json renamed to .sqlx/query-06bbd4a7662ea9ec62a0138efa9acb62c4bd9b646846740333d8ae3d154d1d77.json

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-5e304fafd2e6b526042c2f43e038f6464ef320242782b486f7e17c7742eec1f0.json renamed to .sqlx/query-07ac05be4850e0154414090784fc40392f423c16cd326716994fcb1f45c84eee.json

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-0d16965b4248d7297b92c0d14ded508dbd1407c8963b3fb240ad24b84fdf5fab.json renamed to .sqlx/query-187b82f0cc866ff2f1049aa57d9477cbad81d77c2db2b67dca90de198721b483.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-d2c2173b83c2948b01c2571c5a929a3c89e0725d2d2d7a1aa6739f1870a4fd05.json renamed to .sqlx/query-6c3bbaa998dbb9d0b3771c546b014818139cdfac6ed6c15603f6e6806c63ac6f.json

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-b84b09a440fab66250603e50a3080fc67194a7de7cf7241d938b25f068525411.json renamed to .sqlx/query-9f98a138560451105b104fc7a4d3d29e22e58f33e902c06bbf6163ee48ae802a.json

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-9564c6bf55964238003a93c4047ea956656c9ef58f46ede7bc8225900ade4579.json renamed to .sqlx/query-d4d76206a3eeb48f4c3e06e53e781bab2a0e2020e33653ef34ab1ea7df67a0cb.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)