heroku-deploy
heroku-deploy copied to clipboard
Maneger addons
Are there any way to create addons if no exist
?
example I'm doing this way
- name: Create Database
continue-on-error: true
run: heroku addons:create heroku-postgresql --app $APP_NAME --name postgresql-$APP_NAME
https://github.com/eerison/myprofile/blob/c577a5eb5829aa5874d554975d08e572c934c2b7/.github/workflows/ci_cd.yml#L182-L184
But the problem is when run the pipeline again, because this step will try to create the database again...
Your best bet for the moment is to write some kind of script that checks if the addon is already available or not and create an addon accordingly. Though I do hope to add that feature to the Action as well.
Right now I'm just trying to see how I strike a balance between providing features which the CLI already provides and making them Pipeline friendly