Skip to content

Commit

Permalink
Don't deploy if PR Draft or Dependabot (#608)
Browse files Browse the repository at this point in the history
* Don't deploy if PR Draft or Dependabot

* Bump Helm, Helmfile, and Tailscale
  • Loading branch information
rblaine95 authored Dec 22, 2023
1 parent b5cb3d4 commit 324d2f1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:

jobs:
build:
if: ${{ !github.event.pull_request.draft }}
if: github.event.pull_request.draft == false
name: Build images and push to GHCR
permissions:
id-token: write # This is required for requesting the JWT
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
pylint app --rcfile=.pylintrc -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" --exit-zero > pylintreport.txt
test:
if: ${{ !github.event.pull_request.draft }}
if: github.event.pull_request.draft == false
name: Test
needs:
- build
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
if: needs.test.outputs.test_success == 'false'

combine-coverage:
if: ${{ !github.event.pull_request.draft }}
if: github.event.pull_request.draft == false
name: Coverage
runs-on: ubuntu-latest
needs: status-check
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

deploy:
if: ${{ !github.event.pull_request.draft }} && github.actor != 'dependabot[bot]'
if: github.triggering_actor != 'dependabot[bot]' && github.event.pull_request.draft == false
name: Deploy to EKS
environment:
name: dev
Expand All @@ -302,9 +302,9 @@ jobs:
runs-on: ubuntu-latest

env:
TAILSCALE_VERSION: 1.50.1
HELMFILE_VERSION: v0.157.0
HELM_VERSION: v3.13.1
TAILSCALE_VERSION: 1.56.1
HELMFILE_VERSION: v0.159.0
HELM_VERSION: v3.13.3
OUTPUT_FILE: test_output.xml
COVERAGE_FILE: test_coverage.txt
PYTEST_COMPLETIONS: 1
Expand Down Expand Up @@ -598,15 +598,15 @@ jobs:

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
if: always ()
with:
report_paths: './test_output.xml'
fail_on_failure: true
detailed_summary: true
require_passed_tests: true

- name: Pytest coverage comment
if: success() || failure() # always run even if the previous step fails
if: always()
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./test_coverage.txt
Expand All @@ -615,7 +615,7 @@ jobs:

- name: Helmfile destroy pytest
uses: helmfile/[email protected]
if: success() || failure() # always run even if the previous step fails
if: always()
with:
helmfile-args: |
destroy \
Expand Down

0 comments on commit 324d2f1

Please sign in to comment.