Skip to content

Commit 38ef8e4

Browse files
authored
Merge pull request #7 from shaver007/ci/add-github-workflow
ci: add github workflow learn-github-actions
2 parents ca03918 + 3584daf commit 38ef8e4

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: learn-github-actions
2+
run-name: ${{ github.actor }} is learning GitHub Actions
3+
on: [push]
4+
jobs:
5+
check-bats-version:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v5
9+
- uses: actions/setup-node@v4
10+
with:
11+
node-version: '20'
12+
- run: npm install -g bats
13+
- run: bats -v

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends \
5+
python3 python3-pip \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
COPY requirements.txt /tmp/requirements.txt
9+
RUN pip install --upgrade pip \
10+
&& pip install --no-cache-dir -r /tmp/requirements.txt
11+
12+
COPY /app /app
13+
WORKDIR /app
14+
15+
RUN useradd appuser \
16+
&& chown -R appuser:appuser /app
17+
USER appuser
18+
19+
CMD ["python3", "app.py"]

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
flask==3.0.0 ; python_version >= "3.10" and python_version < "4.0"
2+
itsdangerous==2.1.2 ; python_version >= "3.10" and python_version < "4.0"
3+
jinja2==3.1.2 ; python_version >= "3.10" and python_version < "4.0"
4+
markupsafe==2.1.3 ; python_version >= "3.10" and python_version < "4.0"
5+
werkzeug==3.0.0 ; python_version >= "3.10" and python_version < "4.0"

0 commit comments

Comments
 (0)