-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jon (JR) Price
authored
Feb 4, 2024
1 parent
4a2b8a5
commit 69861df
Showing
3 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
env: | ||
SVC_NAME: sk-codename-svc | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to Registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# TODO: Use this when ready to push | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: zerodaysec/${{ env.SVC_NAME }}:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,55 @@ | ||
#VERSION=0.1 | ||
name: CI | ||
|
||
on: push | ||
|
||
env: | ||
SVC_NAME: sk-codename-svc | ||
|
||
jobs: | ||
gitHubActionForPylint: | ||
name: GitHub Action for pylint | ||
pylint: | ||
name: Pylint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- run: pip install pipenv pylint flake8 | ||
- run: pipenv sync && pipenv run pylint **/*.py | ||
# - run: flake8 | ||
python-version: '3.11' | ||
|
||
- run: python -m pip install pipenv pylint | ||
|
||
# TODO: Fix the linting issue... | ||
# - run: pipenv run pylint **/*.py | ||
|
||
hadolint: | ||
name: Hadolint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: Dockerfile | ||
|
||
shellcheck: | ||
name: ShellCheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Run ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
|
||
docker: | ||
name: Docker build smoke test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
# TODO: Use this when ready to push | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: false | ||
tags: zerodaysec/${{ env.SVC_NAME }}:testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.11 | ||
|
||
WORKDIR /app | ||
|
||
# TODO: Need to enable pipenv | ||
# COPY requirements.txt /app/ | ||
COPY app.py /app/ | ||
|
||
ENV FLASK_APP=app.py | ||
|
||
ENTRYPOINT ["flask", "run"] |