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

Review app example gets now executed on every push on a PR #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion example-workflows/review-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
review_app:
runs-on: ubuntu-latest
# only run when a pull request is opened
if: github.event_name == 'pull_request' && github.event.action == 'opened'
if: github.event_name == 'pull_request' && github.event.action != 'closed'
steps:
- name: Cloning repo
uses: actions/checkout@v4
Expand All @@ -23,6 +23,10 @@ jobs:
# create a review app
command: review-apps:create
git_remote_url: 'ssh://dokku@dokku.me:22/appname'
# specify `--force` as a flag for git pushes
git_push_flags: '--force'
# specify the name of the branch, in cas you do not use master
# branch: main
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be removed tbh. There are other examples showing this. The review-app example isn't meant to be a kitchen sink, just what would make the 90% case work. If you normally deploy a different branch, then that should be configured in the app configuration (and therefore cloned). If it isn't cloned, then thats a bug in Dokku.

# specify a name for the review app
review_app_name: review-appname-${{ github.event.pull_request.number }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
Expand Down