Skip to content

Commit

Permalink
Fixing auto pr action (#11)
Browse files Browse the repository at this point in the history
* Update auto-pr-main-to-staging.yml

* Update auto-pr-main-to-staging.yml
  • Loading branch information
himynamesdave authored Nov 5, 2024
1 parent 088ab33 commit 3566a54
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/auto-pr-main-to-staging.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
name: Create a PR to Staging when commit to main
description: Simplifies the workflow for pushing app to staging
name: Auto PR to Staging

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Make a dummy commit to trigger PR
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit --allow-empty -m "Sync main to staging"
- name: Create PR from main to staging
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: staging
Expand Down

0 comments on commit 3566a54

Please sign in to comment.