Skip to content

Commit 17a874a

Browse files
Example workflows + gitleaks
1 parent 8126c50 commit 17a874a

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

.github/workflows/echo_secret.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: echo_secret
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- shell: bash
12+
env:
13+
SUPER_SECRET: ${{ secrets.CREDS }}
14+
run: |
15+
echo "$SUPER_SECRET"

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: gitleaks
2+
23
on: [pull_request, push, workflow_dispatch]
4+
35
jobs:
46
scan:
57
name: gitleaks

.github/workflows/run_script.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: run_script
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
ci:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-version: ["3.10.5"]
12+
poetry-version: ["1.1.13"]
13+
os: [ubuntu-latest]
14+
arch: ['x64']
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- name: checkout repo content
20+
uses: actions/checkout@v3
21+
- name: setup python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
architecture: ${{ matrix.arch }}
26+
# - name: Install dependencies
27+
# run: |
28+
# python -m pip install --upgrade pip
29+
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
- name: run poetry image
31+
uses: abatilo/actions-poetry@v2.0.0
32+
with:
33+
poetry-version: ${{ matrix.poetry-version }}
34+
- name: install gh cli
35+
shell: bash
36+
run: |
37+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
38+
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
39+
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
40+
sudo apt update
41+
sudo apt install --no-install-recommends -y gh
42+
- name: run script
43+
shell: bash
44+
env:
45+
username: ${{ secrets.USERNAME }}
46+
run: |
47+
python -m pip install --upgrade pip
48+
poetry install
49+
poetry run python hello.py

0 commit comments

Comments
 (0)