aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-deploy.yml3
-rw-r--r--.github/workflows/main.yml1
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml
index 2582a4113..f38686426 100644
--- a/.github/workflows/build-deploy.yml
+++ b/.github/workflows/build-deploy.yml
@@ -44,7 +44,7 @@ jobs:
with:
context: .
file: ./Dockerfile
- push: true
+ push: ${{ github.ref == 'refs/heads/main' }}
cache-from: type=registry,ref=ghcr.io/python-discord/bot:latest
cache-to: type=inline
tags: |
@@ -57,6 +57,7 @@ jobs:
name: Deploy
needs: build
runs-on: ubuntu-latest
+ if: ${{ github.ref == 'refs/heads/main' }}
environment: production
steps:
- name: Checkout Kubernetes repository
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0f972b16f..a512f289d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -31,7 +31,6 @@ jobs:
build-deploy:
- if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/build-deploy.yml
needs:
- lint-test