Skip to content

Commit

Permalink
feat: add dsfr + fix schemas (#81)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Bouquillon <[email protected]>
  • Loading branch information
revolunet and Julien Bouquillon authored Jan 15, 2024
1 parent e7998b7 commit 17bb069
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
- sonarcloud
- trivy
- zap
- ecoindex
- dsfr
push:
branches:
- master
Expand Down Expand Up @@ -50,6 +52,9 @@ jobs:
with:
url: ${{ github.event.inputs.url }}
tool: ${{ github.event.inputs.tool }}
env:
# to create missing entries in updown.io
UPDOWNIO_API_KEY: ${{ secrets.UPDOWNIO_API_KEY }}

scans:
runs-on: ubuntu-latest
Expand All @@ -74,6 +79,24 @@ jobs:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: get HTML
continue-on-error: true
timeout-minutes: 5
uses: "socialgouv/dashlord-actions/get-html@v1"
if: ${{ matrix.sites.tools['dsfr'] }}
with:
url: ${{ matrix.sites.url }}
output: get-html.html

- name: Détection DSFR
id: html
continue-on-error: true
timeout-minutes: 1
if: ${{ matrix.sites.tools['dsfr'] }}
run: |
(cat get-html.html | grep -q fr-header__brand) && echo '{"detected": true}' > dsfr.json || echo '{"detected": false}' > dsfr.json
cat dsfr.json
- name: sonarcloud scan
if: ${{ matrix.sites.tools.sonarcloud }}
id: sonarcloud
Expand Down
4 changes: 3 additions & 1 deletion dashlord.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: DashLord example
description: Bonnes pratiques techniques
entity: Ministères sociaux
entity: Votre entité
footer: Powered by SocialGouv
marianne: false
tools:
Expand All @@ -20,6 +20,8 @@ tools:
stats: false
declaration-a11y: true
ecoindex: true
dsfr: true
betagouv: true
urls:
- url: https://www.fabrique.social.gouv.fr
repositories:
Expand Down
11 changes: 11 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
"sonarcloud": {
"type": "boolean",
"description": "Enable sonarcloud API results"
},
"budget_page": {
"type": "boolean",
"description": "Enable budget page detection"
},
"dsfr": {
"type": "boolean",
"description": "Enable DSFR detection"
}
},
"required": []
Expand Down Expand Up @@ -133,6 +141,9 @@
"url": {
"type": "string"
},
"title": {
"type": "string"
},
"category": {
"type": "string"
},
Expand Down

0 comments on commit 17bb069

Please sign in to comment.