diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d31fc2a5..c81ce233 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: timo.pagel@owasp.org + branch: ${{ env.HEROKU_BRANCH }} \ No newline at end of file