Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gutenberg mobile workflow #15791

Merged
merged 4 commits into from
Jan 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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