Update addAdult.yml #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AddMember deployment | |
on: | |
push: | |
branches: [ "main" ] | |
env: | |
SERVICE_NAME: addmember | |
RESOURCE_GROUP: rg-microservicios | |
IMAGE_BASE_NAME: aminespinoza/addmember:latest | |
ENVIRONMENT_NAME: env-microservicios | |
jobs: | |
AddMember: | |
name: Add Member deployment | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ github.workspace }}/microservicios/AddMember | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Azure Login | |
uses: Azure/login@v1.4.6 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Install az containerapp extension | |
run: | | |
az config set extension.use_dynamic_install=yes_without_prompt | |
- name: Build Docker NET image | |
run: | | |
docker build --platform linux -t $IMAGE_BASE_NAME . | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Publish Docker NET image | |
run: | | |
docker push $IMAGE_BASE_NAME | |
- name: Deploy Container App | |
run: | | |
az containerapp up --name $SERVICE_NAME --image $IMAGE_BASE_NAME \ | |
--resource-group $RESOURCE_GROUP --environment $ENVIRONMENT_NAME \ | |
--env-vars SERVICEBUS_CONNECTION_STRING="${{secrets.SERVICE_BUS_CONNECTION_STRING}}" SERVICE_BUS_QUEUE_NAME=pickage \ | |
--ingress external --target-port 8080 |