Workflow file for this run
This file contains hidden or 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: Central repo for running language checks | |
| on: | |
| push: | |
| jobs: | |
| get-repository-languages: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/github-script@v8 | |
| id: set-languages-result | |
| with: | |
| script: | | |
| return ['Python'] | |
| let { data } = await github.rest.repos.listLanguages({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }); | |
| return Object.keys(data) | |
| outputs: | |
| languages: ${{ steps.set-languages-result.outputs.result }} | |
| demo_app_authentication: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate a token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.ACTIONS_APP_PRIVATE_KEY }} | |
| - name: Use the token | |
| env: | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| run: | | |
| gh api octocat | |
| - uses: actions/github-script@v8 | |
| env: | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| id: trigger-python-manually | |
| with: | |
| script: | | |
| const {data} = await github.rest.actions.listRepoWorkflows({ | |
| context.repo.owner, | |
| context.repo.repo, | |
| }); | |
| # await github.rest.actions.createWorkflowDispatch({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # workflow_id: '.github/workflows/org.python-ci.yml', | |
| # ref: context.ref | |
| # }); | |
| # call-workflow-passing-data: | |
| # runs-on: ubuntu-latest | |
| # permissions: | |
| # contents: read | |
| # packages: write | |
| # id-token: write | |
| # attestations: write | |
| # strategy: | |
| # matrix: | |
| # language: ${{ fromJSON(needs.get-repository-languages.outputs.languages) }} | |
| # needs: [get-repository-languages] | |
| # steps: | |
| # - name: Checkout current repo | |
| # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| # - uses: actions/github-script@v8 | |
| # id: trigger-python-manually | |
| # with: | |
| # script: | | |
| # await github.rest.actions.createWorkflowDispatch({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # workflow_id: '.github/workflows/org.python-ci.yml', | |
| # ref: context.ref | |
| # }); | |
| # - name: Run scan for ${{matrix.language}} | |
| # if: matrix.language == 'Python' | |
| # uses: ./.github/actions/scans/python | |
| # - name: Run scan for ${{matrix.language}} | |
| # if: matrix.language == 'Dockerfile' | |
| # uses: ./.github/actions/scans/docker |