-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 1.88 KB
/
run_script.yml
File metadata and controls
54 lines (50 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: run_script
on: [workflow_dispatch] # pull_request, push, workflow_dispatch
jobs:
ci:
strategy:
fail-fast: false
matrix:
# hard-coded versions
# python-version: ["3.10.5"]
# poetry-version: ["1.1.13"]
os: [ubuntu-latest]
arch: ['x64']
runs-on: ${{ matrix.os }}
steps:
- name: checkout repo content
uses: actions/checkout@v3
# dynamic versions
- name: Read .tool-versions
uses: marocchino/tool-versions-action@v1
id: versions
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ steps.versions.outputs.python }}
architecture: ${{ matrix.arch }}
- name: run poetry image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ steps.versions.outputs.poetry }}
- name: install gh cli
shell: bash
run: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install --no-install-recommends -y gh
# TODO: download trufflehog
- name: run script
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.USERNAME }}
limit: ${{ secrets.LIMIT }}
visibility: ${{ secrets.VISIBILITY }}
# TODO: parameterize script + args
run: |
python -m pip install --upgrade pip
poetry install
poetry run python scan_repos.py --username '${username}' --limit "${limit}" --visibility ${visibility}