From e438fa7bf1d5b7ab13a4a4926db371e9d9989658 Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:42:04 +0900 Subject: [PATCH 01/11] Create ci.yml --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8c46a0c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: Python application + +on: + push: + branches: [ python-ci-workflow ] + pull_request: + branches: [ python-ci-workflow ] + +jobs: + build: + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Display Python version + run: python -c "import sys; print(sys.version)" From 44bf27c6de5a626925b95ccd2db35e3aebf36bbd Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:44:41 +0900 Subject: [PATCH 02/11] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c46a0c..b1ad70e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,8 @@ on: jobs: build: + build: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python From f6f26d086128b5e638b27fc8b1372fc08d935673 Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:45:57 +0900 Subject: [PATCH 03/11] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1ad70e..04b1d2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python From b5d4537e673ce689a107db5341018b146226f1bc Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:46:59 +0900 Subject: [PATCH 04/11] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04b1d2d..35d72f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python From 353b3ec3dc8b64b1d5d9d29861a8082a18691a5d Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:47:36 +0900 Subject: [PATCH 05/11] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35d72f5..b1ad70e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python From 586b3fa703183a7ae3aa3a00cb825ea1753907d9 Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:48:35 +0900 Subject: [PATCH 06/11] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1ad70e..35d72f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python From 651d6e9c39468c99d72809246e8e50863a308054 Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:50:03 +0900 Subject: [PATCH 07/11] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35d72f5..7036775 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,14 +2,14 @@ name: Python application on: push: - branches: [ python-ci-workflow ] + branches: [ python-ci-workflow-1 ] pull_request: - branches: [ python-ci-workflow ] + branches: [ python-ci-workflow-1 ] jobs: build: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python From 22978f47abb0166754016c64af68977cecace79a Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:52:49 +0900 Subject: [PATCH 08/11] Update ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7036775..bdcb8d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,6 @@ on: branches: [ python-ci-workflow-1 ] jobs: - build: build: runs-on: ubuntu-latest steps: From 42a121eaea14641392365251c4a27361b5263323 Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:41:47 +0900 Subject: [PATCH 09/11] Create app.py --- app.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 app.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..32736b7 --- /dev/null +++ b/app.py @@ -0,0 +1,6 @@ +from flask import Flask +app = Flask(__name__) + +@app.route('/') +def hello_world(): + return 'Hello, GitHub Action!' From 262d2edbabe1cfa34d6a9f316fe094b8f2839ea3 Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:43:02 +0900 Subject: [PATCH 10/11] Create Dockerfile --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..81eb9ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# syntax=docker/dockerfile:1 + +FROM python:3.8-slim-buster + +WORKDIR /app + +COPY requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +COPY . . + +CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] From faa83aa9614267d08d372e38a77469619a4b9c3c Mon Sep 17 00:00:00 2001 From: johanik <77598802+johanik@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:43:35 +0900 Subject: [PATCH 11/11] Create requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7e10602 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +flask