From a136e018088818ea89528a35c928a6f28f25ec92 Mon Sep 17 00:00:00 2001 From: Sunil Kamat <107644736+sukamat@users.noreply.github.com> Date: Thu, 4 Apr 2024 10:27:07 -0700 Subject: [PATCH 1/2] MWPW-145870: Graybox sync enhancement (#191) --- .github/workflows/graybox-sync-repos.yml | 27 +++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/graybox-sync-repos.yml b/.github/workflows/graybox-sync-repos.yml index 3da6d12..998efe4 100644 --- a/.github/workflows/graybox-sync-repos.yml +++ b/.github/workflows/graybox-sync-repos.yml @@ -2,6 +2,14 @@ name: Graybox Repo Sync on: workflow_dispatch: + inputs: + syncBranch: + description: 'Branch to sync' + required: true + default: 'stage' + type: choice + options: + - 'stage' jobs: build: @@ -20,10 +28,20 @@ jobs: uses: actions/checkout@v2 with: persist-credentials: false + ref: ${{ inputs.syncBranch }} - - name: Clone Graybox Repository + - name: Clone Graybox Repository and Checkout Stage Branch run: | git clone https://github.com/adobecom/bacom-graybox.git ../bacom-graybox + cd ../bacom-graybox + git checkout $GB_SYNC_BRANCH + echo "bacom-graybox branch" + git branch + cd ../bacom + echo "bacom branch" + git branch + env: + GB_SYNC_BRANCH: ${{ inputs.syncBranch }} - name: Overwrite graybox repo files with latest from source repo run: | @@ -32,14 +50,17 @@ jobs: - name: Commit and Push Changes to Graybox Repository run: | cd ../bacom-graybox + echo "bacom-graybox branch" + git branch git config user.email "$FG_SYNC_BOT_EMAIL" - git config user.name "graybox-repo-sync[bot]" + git config user.name "milo-repo-sync[bot]" git status git remote set-url origin https://oauth2:$GITHUB_TOKEN@github.com/adobecom/bacom-graybox.git git remote -v git add . git commit -m "Syncing bacom to bacom-graybox" - git push origin main --force + git push origin $GB_SYNC_BRANCH --force env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} FG_SYNC_BOT_EMAIL: ${{ secrets.FG_SYNC_BOT_EMAIL }} + GB_SYNC_BRANCH: ${{ inputs.syncBranch }} From 1272b4296bb18feb99dc6f2ebaf25d8e1abd7465 Mon Sep 17 00:00:00 2001 From: Brandon Marshall Date: Mon, 8 Apr 2024 12:26:04 -0700 Subject: [PATCH 2/2] MWPW-145787 Update .hlxignore (#192) --- .hlxignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.hlxignore b/.hlxignore index 0e0347a..da18a1d 100644 --- a/.hlxignore +++ b/.hlxignore @@ -1,4 +1,7 @@ +*.json +!*/**/*.json .* *.md LICENSE test/* +web-test-runner.config.mjs