Skip to content

Commit de430ce

Browse files
committed
update ci and DOckerfile
1 parent 8189811 commit de430ce

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed
Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
name: Lint cleanup.sh script
1+
name: Lint cleanup.py script
22

33
on:
44
push:
55
paths:
6-
- 'ci-deployment-cleanup/helm-chart/cleanup.sh'
6+
- 'ci-deployment-cleanup/helm-chart/cleanup.py'
77
pull_request:
88
paths:
9-
- 'ci-deployment-cleanup/helm-chart/cleanup.sh'
9+
- 'ci-deployment-cleanup/helm-chart/cleanup.py'
1010

1111
permissions:
1212
contents: read
1313

1414
jobs:
15-
shellcheck:
15+
ruff:
1616
runs-on: ubuntu-24.04
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
20-
21-
- name: Run ShellCheck
22-
uses: ludeeus/action-shellcheck@master
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
2323
with:
24-
scandir: './ci-deployment-cleanup/helm-chart'
25-
format: gcc
26-
severity: error
24+
python-version: '3.11'
25+
26+
- name: Install Ruff
27+
run: pip install ruff
28+
29+
- name: Run Ruff format check
30+
run: ruff format --check ci-deployment-cleanup/helm-chart/cleanup.py
31+
32+
- name: Run Ruff linting
33+
run: ruff check ci-deployment-cleanup/helm-chart/cleanup.py

ci-deployment-cleanup/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ RUN apk add --no-cache \
1818
ca-certificates \
1919
jq \
2020
openssl \
21+
python3 \
22+
py3-pip \
2123
&& ARCH=$(case $(uname -m) in x86_64) echo amd64;; aarch64) echo arm64;; *) echo amd64;; esac) \
2224
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" \
2325
&& chmod +x kubectl \
2426
&& mv kubectl /usr/local/bin/
2527

28+
# Install Python dependencies
29+
RUN pip3 install --no-cache-dir \
30+
python-dateutil \
31+
PyGithub \
32+
kubernetes
33+
2634
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
2735
&& chmod 700 get_helm.sh \
2836
&& ./get_helm.sh \

0 commit comments

Comments
 (0)