Skip to content

Commit

Permalink
Make update dev step conditional (#77)
Browse files Browse the repository at this point in the history
* add names for prettiness

* make prepare_dev conditional on check-status

* don't do release things if changes were just in gh actions
  • Loading branch information
jazzsequence authored Mar 26, 2024
1 parent 886a381 commit 62f831c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:

jobs:
check-status:
name: Check status
runs-on: ubuntu-latest
outputs:
maybe-asset-only: ${{ steps.set-outputs.outputs.maybe-asset-only }}
Expand All @@ -23,13 +24,14 @@ jobs:
shopt -s nocasematch
maybe_asset_only="true"
for file in ${{ steps.get-changed-files.outputs.all }}; do
if [[ $file =~ ^\.wordpress\.org/ ]] && [[ $file != "readme.txt" ]] && [[ $file != "readme.md" ]]; then
if [[ $file =~ ^\.wordpress\.org/ ]] && [[ $file != "readme.txt" ]] && [[ $file != "readme.md" ]] && [[ $file =~ ^\.github/ ]]; then
maybe_asset_only="false"
break
fi
done
echo "::set-output name=maybe-asset-only::$maybe_asset_only"
asset-only:
name: Asset-only update
needs: check-status
if: ${{ needs.check-status.outputs.maybe-asset-only == 'true' }}
runs-on: ubuntu-latest
Expand All @@ -53,6 +55,8 @@ jobs:
build_node_assets: "true"
build_composer_assets: "true"
prepare_dev:
needs: check-status
if: ${{ needs.check-status.outputs.maybe-asset-only == 'false' }}
name: Update Dev environment for the next version
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 62f831c

Please sign in to comment.