Skip to content

Commit

Permalink
end todays tests
Browse files Browse the repository at this point in the history
  • Loading branch information
meowsl committed May 16, 2024
1 parent 24b3935 commit dc88b44
Showing 1 changed file with 103 additions and 3 deletions.
106 changes: 103 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,107 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Test
- uses: actions/checkout@v4

- name: Set Python
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install Bandit
run: pip install bandit

- name: Run Scan
run: bandit -r ./server -f csv -o bandit-report.csv

- name: Upload Scan Artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: bandit-report
path: bandit-report.csv

install-frontend:
name: Install Frontend
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- run: |
make install-frontend
yarn build
echo "Success frontend"
install-backend:
name: Install Backend
needs: security-backend
if: success()
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Poetry
run: |
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.7.1 python -
export PATH="${PATH}:/etc/poetry/bin"
- name: Backend-Install
run: |
make install-backend
echo "Success backend"
build-frontend:
name: Build Frontend
needs: install-frontend
if: success()
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd /home/runner/work/glory-trees/glory-trees
docker image build -t ghcr.io/meowsl/glory-trees:frontend -f deploy/Dockerfile.frontend .
echo "Success build image for Frontend"
- name: Docker Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Image
run: |
docker image push ghcr.io/meowsl/glory-trees:frontend
echo "Success push image"
build-backend:
name: Build Backend
needs: install-backend
if: success()
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd /home/runner/work/glory-trees/glory-trees
docker image build -t ghcr.io/meowsl/glory-trees:backend -f deploy/Dockerfile.backend .
echo "Success build image for Backend"
- name: Docker Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Image
run: |
echo '${{ secrets.DATABASE_URL }}'
echo '${{ secrets.SITE_DOMAIN }}'
docker image push ghcr.io/meowsl/glory-trees:backend
echo "Success push image"

0 comments on commit dc88b44

Please sign in to comment.