...
Always use YAML multi-line strings for shell commands, to simplify quoting:
Instead of this:
Code Block language yaml # BAD! This won't parse! commandrun: bash -c "./managedo.py blah_blah --extra \"{'offset_time': '2023-06-14T04:20:00'}\""
Use this:
Code Block language yaml commandrun: | bash -c "./managedo.py blah_blah --extra \"{'offset_time': '2023-06-14T04:20:00'}\""
...
Code Block | ||
---|---|---|
| ||
name: "Nightly Unit Tests" on: push: branches: - "**/*nightly*" schedule: # Run at 2:22am early every morning Eastern time (6/7:22 UTC) # https://crontab.guru/#22_7_%2a_%2a_%2a - cron: "22 7 * * *" workflow_dispatch: defaults: run: shell: bash permissions: contents: read concurrency: group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: tests: name: "Python ${{ matrix.python-version }} tests" runs-on: ubuntu-20.04 strategy: matrix: python-version: - "3.8" - "3.11" steps: - name: "Check out the repo" uses: "actions/checkout@v3" - name: "Set up Python" uses: "actions/setup-python@v4" with: python-version: "${{ matrix.python-version }}" - name: "Do the thing" run: | python -m tox -- -rfsEX |
Help
For schedule/cron triggers, include a link to
crontab.guru
: https://crontab.guru/#22_7_%2a_%2a_%2a.Use comments to explain tricky parts of the workflow.
...