chore(deps): bump Microsoft.Extensions.DependencyInjection from 9.0.0 to 9.0.1 #34
This file contains 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
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
strategy: | |
matrix: | |
service: | |
["Inventories", "Orchestrators", "Orders", "Payments", "Stocks"] | |
steps: | |
# Checkout the repository to access the code | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
# Login to GitHub Container Registry to push Docker images | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Dynamically create the lowercase service name | |
- name: Set Service Lowercase | |
id: set_service_lowercase | |
run: | | |
service_lowercase=$(echo "${{ matrix.service }}" | tr '[:upper:]' '[:lower:]') | |
echo "service_lowercase=${service_lowercase}" >> $GITHUB_ENV | |
# Build and Push Docker Image | |
- name: Build and Push Image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./${{ matrix.service }}/${{ matrix.service }}.API/Dockerfile | |
push: true | |
tags: | | |
ghcr.io/${{ github.actor }}/${{ env.service_lowercase }}.api:latest |