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

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

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Sanitize branch name
run: echo "SAFE_REF=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV

- name: Build container
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/${{ matrix.cpu }}
Expand All @@ -74,7 +74,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@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
image-ref: "${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.tag }}"
format: "table"
Expand All @@ -95,19 +95,19 @@ jobs:

steps:
- name: Install Cosign
uses: sigstore/cosign-installer@v3.9.2
uses: sigstore/cosign-installer@v4.1.0

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

- name: Login to GitHub container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:

env:
CARGO_TERM_COLOR: always
# sccache
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

jobs:
test:
Expand All @@ -29,12 +32,12 @@ jobs:

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

- name: Scan code with Trivy
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
scan-ref: '.'
Expand All @@ -43,10 +46,8 @@ jobs:
severity: "CRITICAL,HIGH,MEDIUM"
scanners: "vuln"

- name: Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Install dependencies
run: apt-get update && apt-get -y install protobuf-compiler libnftnl-dev libmnl-dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
submodules: recursive

Expand All @@ -118,7 +118,7 @@ jobs:
run: mv target/${{ matrix.target }}/release/defguard-gateway ${{ matrix.asset_name }}-${{ github.ref_name }}

- name: Tar
uses: a7ul/tar-action@v1.1.0
uses: a7ul/tar-action@v1.2.0
with:
command: c
files: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.vars.outputs.TAG_NAME }}
submodules: recursive

- name: Create SBOM with Trivy
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
format: 'spdx-json'
Expand All @@ -43,7 +43,7 @@ jobs:
scanners: "vuln"

- name: Create docker image SBOM with Trivy
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
image-ref: "ghcr.io/defguard/gateway:${{ steps.vars.outputs.VERSION }}"
scan-type: 'image'
Expand All @@ -53,7 +53,7 @@ jobs:
scanners: "vuln"

- name: Create security advisory file with Trivy
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
format: 'json'
Expand All @@ -63,7 +63,7 @@ jobs:
scanners: "vuln"

- name: Create docker image security advisory file with Trivy
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
image-ref: "ghcr.io/defguard/gateway:${{ steps.vars.outputs.VERSION }}"
scan-type: 'image'
Expand Down
Loading