Skip to content

fix: pass action when using dry run#22

Closed
Peetee06 wants to merge 3 commits into
shorebirdtech:mainfrom
Peetee06:fix/pass-when-dry-run
Closed

fix: pass action when using dry run#22
Peetee06 wants to merge 3 commits into
shorebirdtech:mainfrom
Peetee06:fix/pass-when-dry-run

Conversation

@Peetee06
Copy link
Copy Markdown

Fixes #21

Not sure if the additional e2e test is wanted or unnecessary overhead. Let me know what you think!

@bdero bdero self-requested a review May 4, 2026 17:13
Copy link
Copy Markdown
Member

@bdero bdero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Apologies we got to this so late. Would you remind rebasing this branch to resolve the new conflicts?

Comment thread action.yml
RELEASE_VERSION=$(echo $GREP_MATCH | sed -E 's/^.+ Published Release (.*)\!$/\1/')
echo "release-version=$(echo $RELEASE_VERSION)" >> $GITHUB_OUTPUT
# Check if --dry-run or -n is in the args
if echo "${{ inputs.args }}" | grep -qE -- "(--dry-run|-n\b)"; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo "${{ inputs.args }}" | grep -qE … interpolates user-controlled args straight into the shell. Same hazard #23 set out to fix on the release-invocation line. A quote, $(…), or backtick in args gets evaluated by the shell before grep ever sees it. Post-rebase, drive this check off the sanitized $ARGS bash variable instead of re-injecting ${{ inputs.args }}.

run: flutter create e2e_test_dry_run --empty

- name: 🐦 Shorebird Init
run: shorebird init --force
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shorebird init --force here is missing --organization-id, but the existing e2e job needs it (main has --organization-id=46686 after the recent rotation). This new job will probably fail with "Organization with ID '...' not found" or hang on a prompt. Needs the same id.

runs-on: ${{ matrix.os }}
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action versions on the new job lag the existing e2e job — actions/checkout@v4 here (and actions/setup-java@v4 on line 101) vs @v6 and @v5 on main after the recent dependabot bump. Worth matching. The two jobs also share ~12 setup steps verbatim, so if we end up keeping both, factoring the common steps into a reusable composite would stop this drift on the next bump.

@Peetee06
Copy link
Copy Markdown
Author

hey @bdero based on this answer I'd close this PR instead: #21 (comment)

Adding a way to check programmatically what the latest Flutter version supported by Shorebird is would already solve our problem.

@Peetee06 Peetee06 closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action fails with exit code 1 when using --dry-run option

3 participants