From 3584daf17c98fbeb4ff97b07cfb5f462810e8c6c Mon Sep 17 00:00:00 2001 From: shaver007 Date: Tue, 18 Nov 2025 17:49:27 +0200 Subject: [PATCH] ci: add github workflow learn-github-actions --- .github/workflows/learn-github-actions.yml | 13 +++++++++++++ Dockerfile | 19 +++++++++++++++++++ requirements.txt | 5 +++++ 3 files changed, 37 insertions(+) create mode 100644 .github/workflows/learn-github-actions.yml create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml new file mode 100644 index 00000000..fa42c6d2 --- /dev/null +++ b/.github/workflows/learn-github-actions.yml @@ -0,0 +1,13 @@ +name: learn-github-actions +run-name: ${{ github.actor }} is learning GitHub Actions +on: [push] +jobs: + check-bats-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm install -g bats + - run: bats -v \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..4e20cfb5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:22.04 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + python3 python3-pip \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt /tmp/requirements.txt +RUN pip install --upgrade pip \ + && pip install --no-cache-dir -r /tmp/requirements.txt + +COPY /app /app +WORKDIR /app + +RUN useradd appuser \ + && chown -R appuser:appuser /app +USER appuser + +CMD ["python3", "app.py"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..134fc824 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +flask==3.0.0 ; python_version >= "3.10" and python_version < "4.0" +itsdangerous==2.1.2 ; python_version >= "3.10" and python_version < "4.0" +jinja2==3.1.2 ; python_version >= "3.10" and python_version < "4.0" +markupsafe==2.1.3 ; python_version >= "3.10" and python_version < "4.0" +werkzeug==3.0.0 ; python_version >= "3.10" and python_version < "4.0" \ No newline at end of file