The env context is only available at the step level, not the job one so we need to use the github context instead. But the head_ref will only be populated if we run in a pull_request event. So until we find a better solution, let's match on the repo URL.
25 lines
624 B
YAML
25 lines
624 B
YAML
name: Security audit
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
audit:
|
|
runs-on: ubuntu-18.04
|
|
if: github.repository == 'google/OpenSK'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
target: thumbv7em-none-eabi
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7
|
|
- name: Install Python dependencies
|
|
run: python -m pip install --upgrade pip setuptools wheel
|
|
- name: Set up OpenSK
|
|
run: ./setup.sh
|
|
- uses: actions-rs/audit-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|