Skip to content

a

a #33

Workflow file for this run

name: Central repo for running language checks
on:
push:
jobs:
get-scan-languages:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/github-script@v8
id: set-repo-languages
with:
script: |
return ['Python', 'Dockerfile']
let { data } = await github.rest.repos.listLanguages({
owner: context.repo.owner,
repo: context.repo.repo,
});
return Object.keys(data)
outputs:
languages: ${{ steps.set-repo-languages.outputs.result }}
run-python-scan:

Check failure on line 25 in .github/workflows/language.yml

View workflow run for this annotation

GitHub Actions / Central repo for running language checks

Invalid workflow file

The workflow is not valid. .github/workflows/language.yml (Line: 25, Col: 3): Error calling workflow 'uktrade/github-standards/.github/workflows/org.python-ci.yml@76647dbf134394fd63fbac110ce72dd0e1a18ed4'. The nested job 'security-scan' is requesting 'actions: read', but is only allowed 'actions: none'.
if: ${{contains(fromJSON(needs.get-scan-languages.outputs.languages), 'Python') }}
needs: [get-scan-languages]
permissions:
contents: read
security-events: write
issues: write
pull-requests: write
uses: ./.github/workflows/org.python-ci.yml
run-docker-scan:
if: ${{contains(fromJSON(needs.get-scan-languages.outputs.languages), 'Docker') }}
needs: [get-scan-languages]
permissions:
contents: read
uses: ./.github/workflows/org.docker-ci.yml
run-terraform-scan:
if: ${{contains(fromJSON(needs.get-scan-languages.outputs.languages), 'Terraform') }}
needs: [get-scan-languages]
permissions:
contents: read
uses: ./.github/workflows/org.terraform-ci.yml
# run-scan:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# strategy:
# matrix:
# language: ${{ fromJSON(needs.get-scan-languages.outputs.languages) }}
# needs: [get-scan-languages]
# steps:
# - name: Checkout current repo
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# # Ideally we would have a single task that uses the value from the matrix, however this is currently unsupported by github.
# # - name: Run scan
# # uses: ./.github/actions/scans/${{matrix.language}}
# - name: Run Python scan
# if: matrix.language == 'Python'
# uses: ./.github/workflows/org.python-ci.yml
# - name: Run Docker scan
# if: matrix.language == 'Dockerfile'
# uses: ./.github/workflows/org.docker-ci.yml
# - name: Run TypeScript scan
# if: matrix.language == 'Typescript'
# uses: ./.github/actions/scans/typescript