Scheduled code tests trigger #25
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: Scheduled code tests trigger | |
| on: | |
| # Run daily, at 00:00. | |
| schedule: | |
| - cron: '0 0 * * *' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| # Opt into Node.js 24 for all JavaScript actions. | |
| # Remove once all referenced actions natively target Node 24. | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| code-tests-trigger: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout develop branch | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: develop | |
| - name: Setup easyscience[bot] | |
| id: bot | |
| uses: ./.github/actions/setup-easyscience-bot | |
| with: | |
| app-id: ${{ vars.EASYSCIENCE_APP_ID }} | |
| private-key: ${{ secrets.EASYSCIENCE_APP_KEY }} | |
| - name: Dispatch code tests workflow | |
| uses: ./.github/actions/github-script | |
| with: | |
| github-token: ${{ steps.bot.outputs.token }} | |
| script: | | |
| await github.rest.actions.createWorkflowDispatch({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| workflow_id: "test.yml", | |
| ref: "develop" | |
| }); |