Skip to content

Commit

Permalink
Moved actions from ChurchAppsWeb to ChurchAppsSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
jzongker committed Oct 28, 2024
1 parent fa913a8 commit 5c27a44
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/deploy-all-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "Deploy All Prod"

on:
schedule:
- cron: '0 8 * * 1'
workflow_dispatch:

jobs:
notify:
name: "Trigger Production Deploys"
runs-on: ubuntu-latest

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash

steps:
- name: Notify MembershipApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/MembershipApi
PARENT_BRANCH: main
WORKFLOW_ID: 5393792
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify LessonsApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/LessonsApi
PARENT_BRANCH: main
WORKFLOW_ID: 12009770
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify MessagingApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/MessagingApi
PARENT_BRANCH: main
WORKFLOW_ID: 6421456
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify AttendanceApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/AttendanceApi
PARENT_BRANCH: main
WORKFLOW_ID: 5210296
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify GivingApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/GivingApi
PARENT_BRANCH: main
WORKFLOW_ID: 5179248
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify ReportingApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/ReportingApi
PARENT_BRANCH: main
WORKFLOW_ID: 17427583
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify ContentApi
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/ContentApi
PARENT_BRANCH: main
WORKFLOW_ID: 39047587
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify ChumsApp
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/ChumsApp
PARENT_BRANCH: main
WORKFLOW_ID: 5436869
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
- name: Notify ChurchAppsWeb
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
PARENT_REPO: LiveChurchSolutions/ChurchAppsWeb
PARENT_BRANCH: main
WORKFLOW_ID: 5551204
run:
|
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}'
43 changes: 43 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
release:
types: [created]
workflow_dispatch:

name: Deploy Prod

env:
SERVERLESS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}

jobs:
deploy:
name: Deploy Prod
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Setup Serverless
run: |
export SERVERLESS_ACCESS_KEY="$AWS_ACCESS_KEY_ID"
- name: Deploy
run: |
npm ci
npm run deploy-prod
43 changes: 43 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches: [main]
workflow_dispatch:

name: Deploy Staging

env:
SERVERLESS_ACCESS_KEY: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}

jobs:
deploy:
name: Deploy Staging
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Setup Serverless
run: |
export SERVERLESS_ACCESS_KEY="$SERVERLESS_ACCESS_KEY"
- name: Deploy
run: |
npm ci
npm run deploy-staging

0 comments on commit 5c27a44

Please sign in to comment.