diff --git a/.github/workflows/azure_webapp.yml b/.github/workflows/azure_webapp.yml new file mode 100644 index 0000000..a9c02b6 --- /dev/null +++ b/.github/workflows/azure_webapp.yml @@ -0,0 +1,24 @@ +name: Azure Webapp deploy + +on: workflow_dispatch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: azure/docker-login@v1 + with: +# login-server: mycontainer.azurecr.io + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - run: | + docker build . -t mbuchoff/hackathon_230909:${{ github.sha }} + docker push mbuchoff/hackathon_230909:${{ github.sha }} + + - uses: azure/webapps-deploy@v2 + with: + app-name: 'app-hackathon' + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + images: 'mbuchoff/hackathon_230909:${{ github.sha }}' \ No newline at end of file diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 18e6de8..7d7bf32 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,11 +1,9 @@ name: Build, Test and Deploy backend on: - # opening a pull request to master and develop branch will be a trigger pull_request: branches: - develop - # any code pushed to master and develop branch will also be a trigger push: branches: - develop