Skip to content

Commit

Permalink
feat: add heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
wurstbrot committed Mar 16, 2024
1 parent 8e8f022 commit 7b80ae2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,22 @@ jobs:
branch: ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}}
heroku:
if: github.repository == 'devsecopsmaturitymodel/DevSecOps-MaturityModel' && github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: "Check out Git repository"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- name: "Set Heroku app & branch for ${{ github.ref }}"
run: |
if [ "$GITHUB_REF" == "refs/heads/master" ]; then
echo "HEROKU_APP=dsomm" >> $GITHUB_ENV
echo "HEROKU_BRANCH=master" >> $GITHUB_ENV
fi
- name: "Deploy ${{ github.ref }} to Heroku"
uses: akhileshns/heroku-deploy@9fd0f9faae4aa93a38d6f5e25b9128589f1371b0 #v3.12.14
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ env.HEROKU_APP }}
heroku_email: [email protected]
branch: ${{ env.HEROKU_BRANCH }}

0 comments on commit 7b80ae2

Please sign in to comment.