Skip to content

Commit 2bc3fae

Browse files
brandonpaytondeployment_bot
andauthored
Prep the WP update workflows to be re-enabled (#110)
## Motivation for the change, related issues We can update WP in this repo using default GH secrets rather than bringing our own. This PR changes the WP update workflows to use the defaults. ## Implementation details Change the WP update workflows to: - Persist credentials used to checkout this repo - Push updates with the same credentials ## Testing Instructions (or ideally a Blueprint) - CI --------- Co-authored-by: deployment_bot <[email protected]>
1 parent 6b09477 commit 2bc3fae

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/refresh-wordpress-major-and-beta.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
ref: ${{ github.event.pull_request.head.ref }}
3636
clean: true
37-
persist-credentials: false
37+
persist-credentials: true
3838
submodules: true
3939
- name: 'Install bun'
4040
run: |
@@ -59,19 +59,23 @@ jobs:
5959
- name: Push rebuilt WordPress to GitHub
6060
if: steps.changes.outputs.COMMIT_CHANGES == '1'
6161
run: |
62+
# This appears to be necessary because we encountered the build output being owned by root,
63+
# and there are some subdirectories that the runner user cannot access.
64+
sudo chown -R "$(whoami):$(id -gn)" packages/playground/wordpress-builds/public
6265
git config --global user.name "deployment_bot"
6366
git config --global user.email "[email protected]"
64-
git remote set-url origin https://${{ secrets.GH_ACTOR }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
6567
git add -A
6668
git commit -a -m "Recompile WordPress major and beta versions"
6769
git pull --rebase
6870
# Push if the pull did not result in a conflict
6971
if [ $? -eq 0 ]; then
70-
git push origin HEAD:trunk
72+
git push
7173
fi;
7274
- name: Deploy website
7375
if: steps.changes.outputs.COMMIT_CHANGES == '1'
7476
uses: benc-uk/workflow-dispatch@v1
7577
with:
76-
workflow: build-website.yml
78+
# TODO: Switch back to build-website.yml before merging to public repo
79+
#workflow: build-website.yml
80+
workflow: deploy-private-website.yml
7781
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/refresh-wordpress-nightly.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
ref: ${{ github.event.pull_request.head.ref }}
2929
clean: true
30-
persist-credentials: false
30+
persist-credentials: true
3131
submodules: true
3232
- uses: ./.github/actions/prepare-playground
3333
- name: 'Install bun'
@@ -40,11 +40,10 @@ jobs:
4040
run: |
4141
git config --global user.name "deployment_bot"
4242
git config --global user.email "[email protected]"
43-
git remote set-url origin https://${{ secrets.GH_ACTOR }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
4443
git add -A
4544
git commit -a -m "Refresh WordPress Nightly"
4645
git pull --rebase
4746
# Push if the pull did not result in a conflict
4847
if [ $? -eq 0 ]; then
49-
git push origin HEAD:trunk
48+
git push
5049
fi;

0 commit comments

Comments
 (0)