Skip to content

Commit

Permalink
split merge and push workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Mar 15, 2024
1 parent 67bf133 commit 9d20724
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Merge

on:
merge_group:

jobs:
log:
runs-on: ubuntu-latest
steps:
- name: Log event
run: |
echo "json: ${{ github }}"
printenv
deploy_staging:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Deploy to staging
run: |
echo "Deploying to staging"
# Your deployment script here
13 changes: 0 additions & 13 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Push

on:
merge_group:
push:
branches:
- main
Expand All @@ -14,20 +13,8 @@ jobs:
run: |
echo "json: ${{ github }}"
printenv
deploy_staging:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Deploy to staging
run: |
echo "Deploying to staging"
# Your deployment script here
deploy_production:
if: ${{ github.event_name == 'push' }} && ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: deploy_staging
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down

0 comments on commit 9d20724

Please sign in to comment.