Skip to content

Commit

Permalink
Merge pull request #27 from ledgerleapllc/staging
Browse files Browse the repository at this point in the history
Sync staging to master
  • Loading branch information
ledgerleapllc authored Jun 20, 2022
2 parents d252e6c + 926a0d1 commit 27e2eb0
Show file tree
Hide file tree
Showing 61 changed files with 1,856 additions and 10,493 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Default reviewers
* @ledgerleapllc @jinli111 @ledgerleap1

# Reviewer for CICD related changes
.github @bradjohnl
ansible @bradjohnl


45 changes: 45 additions & 0 deletions .github/workflows/dev_staging_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: development to staging sync


#Run workflow on successful merge to development
on:
push:
branches:
- development


jobs:
create-pull-request:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: tibdex/github-app-token@586e1a624db6a5a4ac2c53daeeded60c5e3d50fe
id: generate-token
with:
app_id: ${{ secrets.PRBOT_APP_ID }}
private_key: ${{ secrets.PRBOT_APP_PRIVATE_KEY }}

#Sync development branch to the staging branch to keep it updated
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: Opening pull request
id: pull
uses: tretuna/sync-branches@ea58ab6e406fd3ad016a064b31270bbb41127f41
with:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
FROM_BRANCH: "development"
TO_BRANCH: "staging"
REVIEWERS: '["ledgerleapllc"]'
CONTENT_COMPARISON: true
PULL_REQUEST_BODY: "This PR is created by the PR Bot to sync the development branch to the staging branch. Please check the content changes also on the development site if you want. You can feel free to ignore this or approve + merge it. If you merge, the prod deployment will start automatically. If you ignore it, it will get renewed the next time a new feature gets merged to the development branch."
PULL_REQUEST_TITLE: "Sync development to staging"

#Display the pull request URL:
- name: Display the pull request URL
run: |
echo "The pull request URL is: ${{ steps.pull.outputs.PULL_REQUEST_URL }}"
12 changes: 6 additions & 6 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Laravel

on:
push:
branches: [ master ]
branches: "*"
pull_request:
branches: [ master ]
branches: "*"

jobs:
laravel-tests:

runs-on: ubuntu-latest
container:
image: kirschbaumdevelopment/laravel-test-runner:7.4

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/staging_master_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: staging to master sync


#Run workflow on successful merge to staging
on:
push:
branches:
- staging


jobs:
create-pull-request:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: tibdex/github-app-token@586e1a624db6a5a4ac2c53daeeded60c5e3d50fe
id: generate-token
with:
app_id: ${{ secrets.PRBOT_APP_ID }}
private_key: ${{ secrets.PRBOT_APP_PRIVATE_KEY }}

#Sync staging branch to the master branch to keep it updated
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: Opening pull request
id: pull
uses: tretuna/sync-branches@ea58ab6e406fd3ad016a064b31270bbb41127f41
with:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
FROM_BRANCH: "staging"
TO_BRANCH: "master"
REVIEWERS: '["ledgerleapllc"]'
CONTENT_COMPARISON: true
PULL_REQUEST_BODY: "This PR is created by the PR Bot to sync the staging branch to the master branch. Please check the content changes also on the staging site if you want. You can feel free to ignore this or approve + merge it. If you merge, the prod deployment will start automatically. If you ignore it, it will get renewed the next time a new feature gets merged to the staging branch."
PULL_REQUEST_TITLE: "Sync staging to master"

#Display the pull request URL:
- name: Display the pull request URL
run: |
echo "The pull request URL is: ${{ steps.pull.outputs.PULL_REQUEST_URL }}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is the backend repo of the portal. To see the frontend repo, visit https://
- PHP 7.4+
- MySql Ver 14.14 Distrib 5.7.37
- Laravel Framework 8.47.0
- Git Version 2+

## Setup

Expand Down
Loading

0 comments on commit 27e2eb0

Please sign in to comment.