Skip to content

Commit

Permalink
Merge pull request GatherPress#855 from carstingaxion/fix/screenshot-…
Browse files Browse the repository at this point in the history
…workflow-trigger-image-compression-4

TRY another trigger to hopefully get 'compress images'  started now.
  • Loading branch information
carstingaxion authored Sep 4, 2024
2 parents 8e35a60 + a5dc058 commit 99b4b6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/wordpress-org-screenshots/blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"networking": true
},
"constants": {
"WP_HTTP_BLOCK_EXTERNAL": "true"
"WP_HTTP_BLOCK_EXTERNAL": "true",
"GATHERPRESS_ALPHA_VERSION": "true"
},
"siteOptions": {
"blogname": "GatherPress",
Expand All @@ -25,8 +26,7 @@
"consts": {
"WP_DEBUG": false,
"WP_DEBUG_DISPLAY": false,
"DISABLE_WP_CRON": true,
"GATHERPRESS_ALPHA_VERSION": 1
"DISABLE_WP_CRON": true
}
},
{
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/compress-images.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Compress Images
on:
push:
branches:
- 'fix/wp-org-screenshots-**'
pull_request:
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference.
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/wordpress-org-screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
git restore ./build
git add -A
git commit -m "Screenshots for ${{ matrix.locale }} updated!"
# git push origin fix/wp-org-screenshots-${{ matrix.locale }}-${{ github.sha }}
git push origin fix/wp-org-screenshots-${{ matrix.locale }}-${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -177,18 +177,3 @@ jobs:
run: gh pr create -B main -H fix/wp-org-screenshots-${{ matrix.locale }}-${{ github.sha }} --title 'Update ${{ matrix.locale }} screenshots for wordpress.org' --body 'Created with ❤️ by WordPress Playground, Playwright & GitHub action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# The compress images workflow says: "This action only runs for pushes to PRs"
# So lets TRY to put the push event after the pr creation,
# to hopefully get this triggered now.
- name: Push updated screenshots
# Using "continue-on-error:true" results in 'conclusion' being a success in any case, while the 'outcome' can differ.
# And, as you already guessed, if: failure() looks at 'conclusion'.
if: ${{ github.event.inputs.updateAllSnapshots || steps.screenshot-tests.outcome == 'failure' }}
# git checkout -b fix/wp-org-screenshots-${{ matrix.locale }}-${{ github.sha }}
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
run: |
git push origin fix/wp-org-screenshots-${{ matrix.locale }}-${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 99b4b6a

Please sign in to comment.