Skip to content

Commit

Permalink
Added GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chelsea486MHz committed Jan 4, 2024
1 parent d2855cb commit ab8c93b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E501
69 changes: 69 additions & 0 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: auth

on:
push:
paths:
- 'auth/**.py'
pull_request:
paths:
- 'auth/**.py'

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 auth/*.py
bandit:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit
- name: Run bandit
run: |
bandit -r auth/*.py || true
publish:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: chelsea486mhz
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:auth"
push: true
tags: chelsea486mhz/stargazer-auth:latest

0 comments on commit ab8c93b

Please sign in to comment.