Skip to content

Commit

Permalink
Merge pull request #15791 from wordpress-mobile/fix/github-worflow-gu…
Browse files Browse the repository at this point in the history
…tenberg-mobile-sed

Fix gutenberg mobile workflow
  • Loading branch information
enejb authored Jan 4, 2022
2 parents 59fe69c + 9c828c6 commit 4768d54
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/automated-version-update-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,28 @@ jobs:
runs-on: ubuntu-latest
env:
GUTENBERG_MOBILE_VERSION: ${{ github.event.inputs.gutenbergMobileVersion }}
PR_TITLE: ${{ github.event.inputs.title || format('{{Automated gutenberg-mobile version update for {0} !}}', github.event.inputs.gutenbergMobileVersion ) }}
PR_BODY: ${{ github.event.inputs.body || format( '{{This PR incorporates changes from {0}.}}', github.event.inputs.prURL ) }}
PR_TITLE: ${{ github.event.inputs.title || format('{ Automated gutenberg-mobile version update for {0} ! }', github.event.inputs.gutenbergMobileVersion ) }}
PR_BODY: ${{ github.event.inputs.body || format( '{ This PR incorporates changes from {0}. }', github.event.inputs.prURL ) }}
GUTENBERG_MOBILE_PR_URL: ${{ github.event.inputs.prURL }}

run: |
PR_DESCRIPTION=$(cat << EOF
## Description
$PR_BODY
Related Gutenberg Mobile Pr: $GUTENBERG_MOBILE_PR_URL
EOF
)
echo "::set-output name=pr_description::$PR_DESCRIPTION"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update Gutenberg Mobile Version
run: |
sed -i "s/ext\.gutenbergMobileVersion = '.*'/ext.gutenbergMobileVersion = '$GUTENBERG_MOBILE_VERSION'/g" build.gradle
sed -i '' -E "s/gutenbergMobileVersion = '(.*)'/gutenbergMobileVersion = '$GUTENBERG_MOBILE_VERSION'/" build.gradle
- name: Compute vars
id: vars
run: |
Expand All @@ -44,7 +56,6 @@ jobs:
fi
echo ::set-output name=title::"$PR_TITLE"
echo ::set-output name=commit_message::"Update gutenbergMobileVersion to $GUTENBERG_MOBILE_VERSION"
echo ::set-output name=pr_description::"##Description \n $PR_BODY \n\n Related Changes: $GUTENBERG_MOBILE_PR_URL"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
Expand Down

0 comments on commit 4768d54

Please sign in to comment.