From 0af5fadc0076c3a4d061511564209658c168fdcb Mon Sep 17 00:00:00 2001 From: David Greenwood Date: Tue, 5 Nov 2024 12:18:13 +0000 Subject: [PATCH] merging main into staging (#7) * g (#4) * Create auto-pr-main-to-staging.yml (#5) --- .github/workflows/auto-pr-main-to-staging.yml | 25 +++++++++++++++++++ Dockerfile.deploy | 6 ----- 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/auto-pr-main-to-staging.yml diff --git a/.github/workflows/auto-pr-main-to-staging.yml b/.github/workflows/auto-pr-main-to-staging.yml new file mode 100644 index 0000000..b06af1d --- /dev/null +++ b/.github/workflows/auto-pr-main-to-staging.yml @@ -0,0 +1,25 @@ +name: Create a PR to Staging when commit to main +description: Simplifies the workflow for pushing app to staging + +on: + push: + branches: + - main + +jobs: + create-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Create PR from main to staging + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + base: staging + head: main + title: "Create PR from main to staging" + body: "This PR was automatically created to sync changes from `main` to `staging`." + branch: auto-pr-main-to-staging + delete-branch: true \ No newline at end of file diff --git a/Dockerfile.deploy b/Dockerfile.deploy index f50108a..40d990d 100644 --- a/Dockerfile.deploy +++ b/Dockerfile.deploy @@ -1,8 +1,6 @@ FROM python:3.11 ENV PYTHONUNBUFFERED=1 -# Arguments -ARG EMAIL_HOST_USER= ARG DJANGO_SECRET= ARG DJANGO_DEBUG= ARG CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP= @@ -12,7 +10,6 @@ ARG BIN_LIST_API_KEY= ARG OPENAI_API_KEY= ARG OPENAI_MODEL= ARG INPUT_TOKEN_LIMIT= -ARG INPUT_TOKEN_LIMIT= ARG CTIBUTLER_HOST= ARG CTIBUTLER_APIKEY= ARG VULMATCH_HOST= @@ -25,7 +22,6 @@ ARG R2_ACCESS_KEY= ARG R2_SECRET_KEY= ARG R2_CUSTOM_DOMAIN= -# Set environment variables ENV DJANGO_SECRET=${DJANGO_SECRET} ENV DJANGO_DEBUG=${DJANGO_DEBUG} ENV CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP=${CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP} @@ -46,8 +42,6 @@ ENV R2_BUCKET_NAME=${R2_BUCKET_NAME} ENV R2_ACCESS_KEY=${R2_ACCESS_KEY} ENV R2_CUSTOM_DOMAIN=${R2_CUSTOM_DOMAIN} - - WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install -r requirements.txt