Upgrading stack of an app
Use the stack:set command via Heroku CLI:
heroku stack:set heroku-22 -a <app name>
Then rebuild your app to take effect of the change. You can create an empty commit to trigger a new build:
git commit --allow-empty -m "Upgrading to heroku-22"
git push heroku master