-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae24dc8
commit 93843ae
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
# -> local: SSH_GITHUB_KEY -> SSH key used to connect to GitHub for remote git operations | ||
# -> local: ACQUIA_SSH_KEY -> SSH key used to connect to Acquia GitLab for remote git operations | ||
# -> local: ACQUIA_REMOTE_REPO_URL -> URL for the Acquia GitLab repository | ||
# -> local: GITHUB_PRIVATE_REPO -> The private repo to merge into the tracked repo | ||
# -> global: SLACK_DOIT_WEBHOOK_URL -> Webhook URL for posting messages to slack | ||
# - GitHub VARIABLES: | ||
# -> local: SLACK_DRUPAL_CHANNEL -> Channel to post devops messages into | ||
|
@@ -76,6 +77,24 @@ jobs: | |
fetch-depth: 0 # 0 = all, otherwise, you will fail to push refs to dest repo | ||
path: candidate # Checkout into this folder | ||
|
||
# checkout the private repository which has settings and secrets etc | ||
- name: Checkout the private repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ secrets.GITHUB_PRIVATE_REPO }} | ||
ssh-key: ${{ secrets.SSH_GITHUB_KEY }} | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
fetch-depth: 0 # 0 = all, otherwise, you will fail to push refs to dest repo | ||
path: private # Checkout into this folder | ||
|
||
# Merge the private repo into the tracked repo | ||
- name: Merge the private repo files | ||
run: | | ||
rm -rf private/.git && | ||
find private/. -iname '*..gitignore' -exec rename 's/\.\.gitignore/\.gitignore/' '{}' \; && | ||
rsync -aE "private/" "candidate/" --exclude=*.md && | ||
rm -rf private || (echo "::error file=deploy.yml,title=Error,line=93::$err" && exit 1) | ||
- name: Post to Slack | ||
uses: act10ns/[email protected] | ||
with: | ||
|