mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-04-26 21:45:45 +00:00
Update CI workflows
This commit is contained in:
@@ -52,8 +52,8 @@ jobs:
|
||||
echo "Using version from SHA: $VERSION"
|
||||
fi
|
||||
|
||||
if [ "${VERSION}" = "master" ] || [ -z "${VERSION}" ]; then
|
||||
echo "Error: Invalid version '${VERSION}'. Version cannot be 'master' or empty." >&2
|
||||
if [ "${VERSION}" = "master" ] || [ "${VERSION}" = "dev" ] || [ -z "${VERSION}" ]; then
|
||||
echo "Error: Invalid version '${VERSION}'. Version cannot be a branch name or empty." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
(cd meshchatx/public && zip -r ../../release-assets/meshchatx-frontend.zip .)
|
||||
|
||||
# Generate SBOM (CycloneDX)
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/917e0e52b2f663cbbe13e63b7176262e248265ae/trivy_0.68.2_Linux-64bit.deb
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/fdfe96b77d2f7b7f5a90cea00af5024c9f728f17/trivy_0.69.3_Linux-64bit.deb
|
||||
sudo dpkg -i /tmp/trivy.deb || sudo apt-get install -f -y
|
||||
trivy fs --format cyclonedx --include-dev-deps --output release-assets/sbom.cyclonedx.json .
|
||||
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
echo "Error: Version is empty" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "${VERSION}" = "master" ]; then
|
||||
if [ "${VERSION}" = "master" ] || [ "${VERSION}" = "dev" ]; then
|
||||
echo "Error: Invalid version '${VERSION}'. Version cannot be a branch name." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -5,6 +5,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
@@ -48,7 +49,7 @@ jobs:
|
||||
|
||||
- name: Download Trivy
|
||||
run: |
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/917e0e52b2f663cbbe13e63b7176262e248265ae/trivy_0.68.2_Linux-64bit.deb
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/fdfe96b77d2f7b7f5a90cea00af5024c9f728f17/trivy_0.69.3_Linux-64bit.deb
|
||||
sudo dpkg -i /tmp/trivy.deb || sudo apt-get install -f -y
|
||||
|
||||
- name: Trivy FS scan
|
||||
@@ -85,7 +86,7 @@ jobs:
|
||||
trivy image --exit-code 0 "$IMAGE_TAG"
|
||||
|
||||
build-dev:
|
||||
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
|
||||
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -114,7 +115,7 @@ jobs:
|
||||
|
||||
- name: Download Trivy
|
||||
run: |
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/917e0e52b2f663cbbe13e63b7176262e248265ae/trivy_0.68.2_Linux-64bit.deb
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/fdfe96b77d2f7b7f5a90cea00af5024c9f728f17/trivy_0.69.3_Linux-64bit.deb
|
||||
sudo dpkg -i /tmp/trivy.deb || sudo apt-get install -f -y
|
||||
|
||||
- name: Trivy FS scan
|
||||
|
||||
@@ -2,9 +2,9 @@ name: OSV-Scanner PR Scan
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
branches: [master, dev]
|
||||
merge_group:
|
||||
branches: [master]
|
||||
branches: [master, dev]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
schedule:
|
||||
- cron: "30 12 * * 1"
|
||||
push:
|
||||
branches: [master]
|
||||
branches: [master, dev]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
- name: Download Trivy
|
||||
run: |
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/917e0e52b2f663cbbe13e63b7176262e248265ae/trivy_0.68.2_Linux-64bit.deb
|
||||
curl -L -o /tmp/trivy.deb https://git.quad4.io/Quad4-Software/Trivy-Assets/raw/commit/fdfe96b77d2f7b7f5a90cea00af5024c9f728f17/trivy_0.69.3_Linux-64bit.deb
|
||||
sudo dpkg -i /tmp/trivy.deb || sudo apt-get install -f -y
|
||||
|
||||
- name: Trivy FS scan
|
||||
|
||||
Reference in New Issue
Block a user