From 0c6aba41f6d688f3f990b2752c2254bb87be19c7 Mon Sep 17 00:00:00 2001 From: Lance Tan Date: Sat, 21 Oct 2023 13:47:42 -0700 Subject: [PATCH] Remove template --- .../{backend/python.yml => backend-ci.yml} | 23 ++++++++----------- .github/workflows/build.yml | 21 ----------------- 2 files changed, 10 insertions(+), 34 deletions(-) rename .github/workflows/{backend/python.yml => backend-ci.yml} (63%) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/backend/python.yml b/.github/workflows/backend-ci.yml similarity index 63% rename from .github/workflows/backend/python.yml rename to .github/workflows/backend-ci.yml index 45161cc..25bfac3 100644 --- a/.github/workflows/backend/python.yml +++ b/.github/workflows/backend-ci.yml @@ -1,25 +1,22 @@ -name: Build Python and Django +name: Build Pipeline for Python and Django on: - workflow_call: - inputs: - python_version: - description: 'Python version' - type: string - default: '3.10' - secrets: - django_secret: - required: true + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: runs-on: ubuntu-latest steps: - - name: Set up Python ${{ inputs.python_version }} + - uses: actions/checkout@v4 + + - name: Set up Python uses: actions/setup-python@v3 with: - python-version: ${{ inputs.python_version }} + python-version: '3.10' - name: Install pipenv run: | @@ -38,6 +35,6 @@ jobs: - name: Makes sure it runs env: - SECRET_KEY: ${{ secrets.django_secret }} + SECRET_KEY: ${{ secrets.DJANGO_SECRET }} run: | pipenv run python manage.py check \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index b882e55..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Build Pipeline - -on: - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v4 - - - name: Run Python workflow - uses: ./.github/workflows/backend/python.yml - with: - django_secret: ${{ secrets.DJANGO_SECRET }} \ No newline at end of file