DashLord scans #724
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
name: DashLord scans | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" # see https://crontab.guru | |
# allow only one concurrent scan action | |
concurrency: | |
cancel-in-progress: true | |
group: scans | |
jobs: | |
init: | |
runs-on: ubuntu-latest | |
name: Prepare | |
outputs: | |
json: ${{ steps.init.outputs.json }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: init | |
uses: "DISIC/dashlord-observatoire/actions/airtable-procedures-urls@main" | |
with: | |
airtable_api_key: ${{ secrets.AIRTABLE_API_KEY }} | |
jdma_api_key: ${{ secrets.JDMA_TOKEN }} | |
updown_api_key: ${{ secrets.UPDOWNIO_API_KEY }} | |
airtable_base_id: ${{ secrets.AIRTABLE_BASE_ID }} | |
airtable_procedures_table_name: ${{ secrets.AIRTABLE_TABLE_NAME }} | |
airtable_editions_table_name: ${{ secrets.AIRTABLE_EDITIONS_TABLE_NAME }} | |
output: airtable-procedures_urls.json | |
scans: | |
runs-on: ubuntu-latest | |
name: Scan | |
needs: init | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
sites: ${{ fromJson(needs.init.outputs.json) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
mkdir scans | |
- uses: actions/cache@v2 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Déclaration a11y | |
continue-on-error: true | |
uses: "socialgouv/dashlord-actions/declaration-a11y@feat/a11y-output-url" | |
id: declaration-a11y | |
with: | |
url: ${{ matrix.sites.link }} | |
output: scans/declaration-a11y.json | |
- name: RGAA | |
continue-on-error: true | |
if: ${{ steps.declaration-a11y.outputs.url && steps.declaration-a11y.outputs.url != '' }} | |
uses: "DISIC/dashlord-observatoire/actions/rgaa@main" | |
with: | |
declarationUrl: ${{ steps.declaration-a11y.outputs.url }} | |
output: scans/rgaa.json | |
- name: JDMA | |
continue-on-error: true | |
uses: "DISIC/dashlord-observatoire/actions/jdma@main" | |
with: | |
id: ${{ matrix.sites.id }} | |
startDate: ${{ matrix.sites.startDate }} | |
endDate: ${{ matrix.sites.endDate }} | |
output: scans/jdma.json | |
output2: scans/jdma_3months.json | |
- name: UpDown | |
continue-on-error: true | |
uses: "DISIC/dashlord-observatoire/actions/updown@main" | |
with: | |
updownToken: ${{ matrix.sites.updownToken }} | |
updownApiKey: ${{ secrets.UPDOWNIO_API_KEY }} | |
startDate: ${{ matrix.sites.startDate }} | |
endDate: ${{ matrix.sites.endDate }} | |
output: scans/updown.json | |
# - name: eco-index | |
# timeout-minutes: 2 | |
# continue-on-error: true | |
# uses: "socialgouv/dashlord-actions/ecoindex@v1" | |
# with: | |
# url: ${{ matrix.sites.link }} | |
# output: scans/ecoindex.json | |
# - name: Lighthouse scan | |
# continue-on-error: true | |
# timeout-minutes: 10 | |
# uses: SocialGouv/dashlord-actions/lhci@v1 | |
# with: | |
# url: ${{ matrix.sites.link }} | |
# - name: Updown.io checks | |
# continue-on-error: true | |
# timeout-minutes: 10 | |
# uses: "MTES-MCT/updownio-action@main" | |
# with: | |
# apiKey: ${{ secrets.UPDOWNIO_API_KEY }} | |
# url: ${{ matrix.sites.link }} | |
# output: scans/updownio.json | |
- uses: DISIC/dashlord-observatoire/actions/save@main | |
with: | |
id: ${{ matrix.sites.id }} | |
url: ${{ matrix.sites.link }} | |
- uses: EndBug/add-and-commit@v7 | |
with: | |
add: '["results"]' | |
author_name: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
author_email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
message: "update: ${{ matrix.sites.link }}" |