-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Build ROCK | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-rock: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: canonical/craft-actions/rockcraft-pack@main | ||
id: rockcraft | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: rock | ||
path: ${{ steps.rockcraft.outputs.rock }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish ROCK | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-rock: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install skopeo | ||
run: | | ||
sudo snap install --devmode --channel edge skopeo | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: rock | ||
|
||
- name: Import and push to github package | ||
run: | | ||
image_name="$(yq '.name' rockcraft.yaml)" | ||
version="$(yq '.version' rockcraft.yaml)" | ||
rock_file=$(ls *.rock | tail -n 1) | ||
sudo skopeo \ | ||
--insecure-policy \ | ||
copy \ | ||
oci-archive:"${rock_file}" \ | ||
docker-daemon:"ghcr.io/dot-5g/${image_name}:${version}" | ||
docker tag ghcr.io/dot-5g/${image_name}:${version} ghcr.io/dot-5g/${image_name}:latest | ||
docker push ghcr.io/dot-5g/${image_name}:${version} | ||
docker push ghcr.io/dot-5g/${image_name}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Scan | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
scan: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install skopeo | ||
run: | | ||
sudo snap install --devmode --channel edge skopeo | ||
- name: Install yq | ||
run: | | ||
sudo snap install yq | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: rock | ||
|
||
- name: Import | ||
run: | | ||
image_name="$(yq '.name' rockcraft.yaml)" | ||
echo "image_name=${image_name}" >> $GITHUB_ENV | ||
version="$(yq '.version' rockcraft.yaml)" | ||
echo "version=${version}" >> $GITHUB_ENV | ||
rock_file=$(ls *.rock | tail -n 1) | ||
sudo skopeo \ | ||
--insecure-policy \ | ||
copy \ | ||
oci-archive:"${rock_file}" \ | ||
docker-daemon:"ghcr.io/dot-5g/${image_name}:${version}" | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: "ghcr.io/dot-5g/${{env.image_name}}:${{env.version}}" | ||
format: "sarif" | ||
output: "trivy-results.sarif" | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: "trivy-results.sarif" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: sepp | ||
base: bare | ||
build-base: [email protected] | ||
version: '0.1' | ||
summary: An open source implementation of the 5G Security Edge Protection Proxy | ||
description: | | ||
An open source implementation of the 5G Security Edge Protection Proxy (SEPP) | ||
that uses the TLS Security Capability to handle the forwarding of Network Functions' | ||
HTTP/2 messages. | ||
license: Apache-2.0 | ||
platforms: | ||
amd64: | ||
|
||
parts: | ||
sepp: | ||
source: . | ||
plugin: go | ||
build-snaps: | ||
- go/1.21/stable | ||
stage-packages: | ||
- ca-certificates_data | ||
- libc6_libs |