Skip to content

Commit

Permalink
Merge pull request #64 from adobecom/stage
Browse files Browse the repository at this point in the history
Release [Stage to Main]
  • Loading branch information
Brandon32 committed Sep 5, 2024
2 parents a1ddbef + 04c3cb0 commit da370b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/fg-sync-repos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Floodgate Repo Sync

on:
push:
branches:
- stage
- main
workflow_dispatch:
inputs:
syncBranch:
Expand Down Expand Up @@ -28,7 +32,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.syncBranch }}
ref: ${{ inputs.syncBranch || github.ref_name }}

- name: Clone Floodgate Repository and Checkout Selected Branch
run: |
Expand All @@ -41,7 +45,7 @@ jobs:
echo "bacom-blog branch"
git branch
env:
FG_SYNC_BRANCH: ${{ inputs.syncBranch }}
FG_SYNC_BRANCH: ${{ inputs.syncBranch || github.ref_name }}

- name: Overwrite floodgate repo files with latest from source repo
run: |
Expand All @@ -54,14 +58,19 @@ jobs:
git branch
git config user.email "$FG_SYNC_BOT_EMAIL"
git config user.name "$FG_SYNC_BOT_NAME"
git status
git remote set-url origin https://oauth2:[email protected]/adobecom/bacom-blog-pink.git
git remote -v
git add .
git commit -m "Syncing bacom-blog to bacom-blog-pink"
git push origin $FG_SYNC_BRANCH --force
git status
if [[ -n $(git status -s) ]]; then
git remote set-url origin https://oauth2:[email protected]/adobecom/bacom-blog-pink.git
git remote -v
git add .
git commit -m "Syncing bacom-blog to bacom-blog-pink"
git push origin $FG_SYNC_BRANCH --force
echo ":heavy_check_mark: Syncing branch $FG_SYNC_BRANCH on bacom-blog to bacom-blog-pink completed successfully." >> $GITHUB_STEP_SUMMARY
else
echo ":heavy_minus_sign: No changes detected on branch $FG_SYNC_BRANCH, nothing to sync." >> $GITHUB_STEP_SUMMARY
fi
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
FG_SYNC_BOT_EMAIL: ${{ secrets.FG_SYNC_BOT_EMAIL }}
FG_SYNC_BOT_NAME: ${{ secrets.FG_SYNC_BOT_NAME }}
FG_SYNC_BRANCH: ${{ inputs.syncBranch }}
FG_SYNC_BRANCH: ${{ inputs.syncBranch || github.ref_name }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ logs/*
node_modules/*
.DS_Store
.idea
*.env
7 changes: 7 additions & 0 deletions tools/sidekick/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@
"url": "https://main--bacom-blog--adobecom.hlx.live/tools/tag-selector",
"isPalette": true,
"paletteRect": "top: 150px; left: 7%; height: 675px; width: 85vw;"
},
{
"containerId": "tools",
"id": "bulk",
"title": "Bulk operations",
"environments": [ "edit", "dev", "preview", "live" ],
"url": "https://main--bacom-blog--adobecom.hlx.page/tools/bulk"
}
]
}

0 comments on commit da370b7

Please sign in to comment.