Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GH action triggers for dependency checks #305

Merged
merged 1 commit into from
May 29, 2024
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
24 changes: 24 additions & 0 deletions .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check deps for freshness

on:
schedule:
- cron: '0 1 1 * 1' # every first of the month
pull_request:
types: [opened, reopened]

jobs:
deps:
runs-on: ubuntu-latest

steps:
- name: Cache lein project dependencies
uses: actions/cache@v4
with:
path: "~/.m2/repository"
key: "${{ runner.os }}-clojure-${{ hashFiles('**/project.clj') }}"

- name: Checkout code
uses: actions/checkout@v4

- name: Check dependency freshness
run: lein check-deps
20 changes: 0 additions & 20 deletions .github/workflows/deps.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build docker image
name: Build and publish docker image

on:
push:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/nvd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check deps for vulnerabilities

on:
push:
branches: ["*"]
tags: ["*"]
schedule:
- cron: '0 1 * * 1,2,3,4,5' # every workday

jobs:
deps:
runs-on: ubuntu-latest

env:
NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }}

steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Cache lein project dependencies
uses: actions/cache@v4
with:
path: "~/.m2/repository"
key: "${{ runner.os }}-clojure-${{ hashFiles('**/project.clj') }}"

- name: NVD clojure
uses: jomco/nvd-clojure-action@v3
20 changes: 2 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
name: Run tests
name: Run checks, tests and docker build

on: push

jobs:
deps:
runs-on: ubuntu-latest

env:
NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }}

steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with: { path: "~/.m2", key: "${{ runner.os }}-m2" }

- name: Check dependency freshness
run: lein check-deps

- name: NVD clojure
uses: jomco/nvd-clojure-action@v3

lint:
runs-on: ubuntu-latest

Expand Down