Skip to content

Commit

Permalink
Moving .github
Browse files Browse the repository at this point in the history
  • Loading branch information
VoronM1522 committed Feb 5, 2025
1 parent 7777953 commit 7cf9274
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:

env:
USERNAME: voronm1522
DOCKER_IMAGE: voronm1522/devops:python-app
DOCKER_TAG: latest

Expand All @@ -14,34 +15,34 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python
- name: Set up python
uses: actions/setup-python@v3
with:
python-version: '3.13'

- name: Install dependencies
- name: Install dependencies and linter
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
pip install -r app_python/requirements.txt
- name: Lint with flake8
run: |
flake8 app.py
flake8 app_python/app.py
- name: Run tests
run: |
python unittests.py
python app_python/unittests.py
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: voronm1522
username: ${{ env.USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
context: app_python
push: true
tags: ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}
2 changes: 1 addition & 1 deletion app_C++/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apk add --no-cache \
make \
wget \
linux-headers
RUN wget https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h -O /usr/local/include/httplib.h
RUN mkdir /usr/local/include && wget https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h -O /usr/local/include/httplib.h
RUN g++ app.cpp -o app
EXPOSE 8080
CMD ["./app"]
Binary file added app_python/__pycache__/app.cpython-313.pyc
Binary file not shown.

0 comments on commit 7cf9274

Please sign in to comment.