Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reusable-content-sync.yml #2463

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/reusable-content-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ env:
PARENT_DEPLOYMENT_REPO: ${{vars.PARENT_DEPLOYMENT_REPO}}
PARENT_DEPLOYMENT_NAME: ${{vars.PARENT_DEPLOYMENT_NAME}}
PARENT_DEPLOYMENT_BRANCH: ${{vars.PARENT_DEPLOYMENT_BRANCH}}
DEPLOYMENT_PRIVATE_KEY: ${{secrets.DEPLOYMENT_PRIVATE_KEY}}
FIREBASE_CONFIG: ${{secrets.FIREBASE_CONFIG}}
GDRIVE_CREDENTIALS: ${{ secrets.GDRIVE_CREDENTIALS }}
GDRIVE_TOKEN: ${{ secrets.GDRIVE_TOKEN }}
PAT: ${{ secrets.PAT }}


name: Perform content sync and create a PR
Expand All @@ -33,11 +32,18 @@ on:
pr-title:
description: Title for PR
type: string
default: sync content from google sheets
default: sync content from Google Sheets
pr-body:
description: Description for PR
type: string
default: Automated PR creation from actions
secrets: # Declare secrets you expect to receive
GDRIVE_CREDENTIALS:
required: true
GDRIVE_TOKEN:
required: true
PAT:
required: true

jobs:
build:
Expand Down Expand Up @@ -67,11 +73,7 @@ jobs:
with:
token: ${{ secrets.PAT }}
path: ".idems_app/deployments/${{env.DEPLOYMENT_NAME}}"

- name: Populate Encryption key
if: env.DEPLOYMENT_PRIVATE_KEY != ''
run: echo "${{env.DEPLOYMENT_PRIVATE_KEY}}" > ./.idems_app/deployments/${{env.DEPLOYMENT_NAME}}/encrypted/private.key


- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -119,7 +121,7 @@ jobs:
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
token: ${{ secrets.PAT }}
token: ${{ env.PAT }}
# Relative path under $GITHUB_WORKSPACE to the repository. Defaults to $GITHUB_WORKSPACE.
path: .idems_app/deployments/${{env.DEPLOYMENT_NAME}}
# The title of the pull request.
Expand Down
Loading