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
3 changes: 0 additions & 3 deletions .github/workflows/changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ jobs:
- "Makefile"
- "rust-toolchain.toml"
- "vdev/**"
deny:
- 'deny.toml'
- "vdev/**"
Comment on lines -152 to -154
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅 just realized those weren't actually exported to the outputs of the job 😬

dependencies:
- ".cargo/**"
- 'Cargo.toml'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/comment-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# /ci-run-all : runs all of the below
# /ci-run-cli : runs CLI - Linux
# /ci-run-misc : runs Miscellaneous - Linux
# /ci-run-deny : runs Deny - Linux
# /ci-run-component-features : runs Component Features - Linux
# /ci-run-cross : runs Cross
# /ci-run-unit-mac : runs Unit - Mac
Expand Down Expand Up @@ -50,6 +51,7 @@ jobs:
github.event.issue.pull_request && ( contains(github.event.comment.body, '/ci-run-all')
|| contains(github.event.comment.body, '/ci-run-cli')
|| contains(github.event.comment.body, '/ci-run-misc')
|| contains(github.event.comment.body, '/ci-run-deny')
|| contains(github.event.comment.body, '/ci-run-component-features')
|| contains(github.event.comment.body, '/ci-run-cross')
|| contains(github.event.comment.body, '/ci-run-unit-mac')
Expand Down Expand Up @@ -89,6 +91,12 @@ jobs:
uses: ./.github/workflows/misc.yml
secrets: inherit

deny:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-deny')
uses: ./.github/workflows/deny.yml
secrets: inherit

component-features:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-component-features')
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Deny - Linux
#
# Checks for security vulnerabilities or license incompatibilities
#
# Runs on:
# - scheduled UTC midnight
# - on PR comment (see comment-trigger.yml)
# - on demand from github actions UI

name: Deny - Linux

on:
workflow_call:
workflow_dispatch:
schedule:
# At midnight UTC
- cron: '0 0 * * *'

jobs:
test-deny:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
steps:
- name: (PR comment) Get PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch

- name: (PR comment) Set latest commit status as pending
if: ${{ github.event_name == 'issue_comment' }}
uses: myrotvorets/set-commit-status-action@v2.0.0
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Deny - Linux
status: pending

- name: (PR comment) Checkout PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}

- name: Checkout branch
if: ${{ github.event_name != 'issue_comment' }}
uses: actions/checkout@v3

- uses: actions/cache@v3
name: Cache Cargo registry + index
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: echo "::add-matcher::.github/matchers/rust.json"
- name: Check cargo deny advisories/licenses
run: make check-deny

- name: (PR comment) Set latest commit status as ${{ job.status }}
uses: myrotvorets/set-commit-status-action@v2.0.0
if: always() && github.event_name == 'issue_comment'
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Deny - Linux
status: ${{ job.status }}
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ jobs:
if: needs.changes.outputs.source == 'true'
run: make check-events

- name: Check cargo deny advisories/licenses
if: needs.changes.outputs.dependencies == 'true' || needs.changes.outputs.deny == 'true'
run: make check-deny

- name: Check that the 3rd-party license file is up to date
if: needs.changes.outputs.dependencies == 'true'
run: make check-licenses
Expand Down