Skip to content
Open
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
16 changes: 8 additions & 8 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive

- name: Login to GitHub container registry
uses: docker/login-action@v4
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4

- name: Sanitize branch name
run: echo "SAFE_REF=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV
Expand All @@ -75,7 +75,7 @@ jobs:
run: echo "value=${INPUT_BUILD_VERSION#v}" >> "$GITHUB_OUTPUT"

- name: Build container
uses: docker/build-push-action@v7
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7
with:
context: .
build-args: DEFGUARD_BUILD_VERSION=${{ steps.build-version.outputs.value }}
Expand All @@ -89,7 +89,7 @@ jobs:
cache-to: type=registry,mode=max,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}-${{ env.SAFE_REF }}

- name: Scan image with Trivy
uses: aquasecurity/trivy-action@v0.36.0
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
env:
TRIVY_SHOW_SUPPRESSED: 1
TRIVY_IGNOREFILE: "./.trivyignore.yaml"
Expand All @@ -113,19 +113,19 @@ jobs:

steps:
- name: Install Cosign
uses: sigstore/cosign-installer@v4.1.0
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1

- name: Docker meta
id: meta
uses: docker/metadata-action@v6
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
with:
images: |
${{ env.GHCR_REPO }}
flavor: ${{ inputs.flavor }}
tags: ${{ inputs.tags }}

- name: Login to GitHub container registry
uses: docker/login-action@v4
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Continuous integration
on:
push:
branches:
- main
- dev
- "release/**"
- "stable/**"
paths-ignore:
- "*.md"
- "LICENSE"
pull_request:
branches:
- main
- dev
- "release/**"
- "stable/**"
paths-ignore:
- "*.md"
- "LICENSE"
Expand All @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive

Expand All @@ -47,7 +47,7 @@ jobs:
echo "$GITHUB_WORKSPACE/.cargo/bin" >> $GITHUB_PATH

- name: Cache cargo registry
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
${{ env.CARGO_HOME }}/registry/index
Expand All @@ -57,10 +57,10 @@ jobs:
restore-keys: cargo-registry-

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9

- name: Scan code with Trivy
uses: aquasecurity/trivy-action@v0.36.0
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
env:
TRIVY_SHOW_SUPPRESSED: 1
TRIVY_IGNOREFILE: "./.trivyignore.yaml"
Expand All @@ -86,7 +86,7 @@ jobs:
cargo clippy --all-targets --all-features -- -D warnings

- name: Install cargo-deny
uses: taiki-e/install-action@v2
uses: taiki-e/install-action@3235f8901fd37ffed0052b276cec25a362fb82e9 # v2
with:
tool: cargo-deny

Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive

Expand All @@ -125,7 +125,7 @@ jobs:
echo "$GITHUB_WORKSPACE/.cargo/bin" >> $GITHUB_PATH

- name: Cache cargo registry
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
${{ env.CARGO_HOME }}/registry/index
Expand All @@ -135,13 +135,13 @@ jobs:
restore-keys: cargo-registry-

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9

- name: Install protoc
run: apt-get update && apt-get -y install protobuf-compiler

- name: Install cargo-nextest
uses: taiki-e/install-action@v2
uses: taiki-e/install-action@3235f8901fd37ffed0052b276cec25a362fb82e9 # v2
with:
tool: cargo-nextest

Expand All @@ -159,7 +159,7 @@ jobs:
run: sccache --show-stats

- name: Upload test archive
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: nextest-archive
path: nextest-archive.tar.zst
Expand Down Expand Up @@ -205,18 +205,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: recursive
fetch-depth: 1

- name: Download test archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: nextest-archive

- name: Install cargo-nextest
uses: taiki-e/install-action@v2
uses: taiki-e/install-action@3235f8901fd37ffed0052b276cec25a362fb82e9 # v2
with:
tool: cargo-nextest

Expand All @@ -233,7 +233,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Delete test archive artifact
uses: actions/github-script@v7
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ permissions:
on:
push:
branches:
- main
- dev
- "release/**"
- "stable/**"
paths-ignore:
- "*.md"
- "LICENSE"
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.34.3
uses: actions-hub/kubectl@2639090a038d46a3b9b98b220ae0837676ded8b7 # v1.34.3
with:
args: --namespace defguard-dev set image deployment/defguard defguard=ghcr.io/defguard/defguard:sha-${{ env.SHORT_SHA }}
Loading
Loading