Skip to content

Commit

Permalink
Update deployment action
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaromenezes committed Jun 20, 2023
1 parent 033ddb1 commit 41ec942
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,41 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.4.6
- name: Code checkout
uses: actions/checkout@v2
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "br-com-lazarodm-image-api"
heroku_email: "lazarodm@gmail.com"
submodules: true

- name: Login to ACR
uses: docker/login-action@v2
with:
registry: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ secrets.REGISTRY_LOGIN_SERVER }}/image-api:${{ github.sha }}

deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Login to Azure'
uses: 'azure/login@v1'
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: 'Deploy to Azure Container Instances'
uses: 'azure/aci-deploy@v1'
with:
resource-group: ${{ secrets.RESOURCE_GROUP }}
dns-name-label: larazodm-image-api
image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/blog:${{ github.sha }}
registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
name: image-api-container-group
location: 'brazil south'

0 comments on commit 41ec942

Please sign in to comment.