-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ea4e6b
commit 30e69f7
Showing
2 changed files
with
70 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
# name: π Build and deploy to acr | ||
name: π Build and deploy to acr | ||
|
||
# on: | ||
# push: | ||
# branches: ["feature/acr-deployment"] | ||
on: | ||
push: | ||
branches: ["feature/acr-deployment"] | ||
|
||
# env: | ||
# WORKING_DIR: users_management | ||
env: | ||
WORKING_DIR: users_management | ||
|
||
# permissions: | ||
# contents: read | ||
# packages: write | ||
# actions: read | ||
permissions: | ||
contents: read | ||
packages: write | ||
actions: read | ||
|
||
# jobs: | ||
# setup: | ||
# runs-on: "ubuntu-latest" | ||
# outputs: | ||
# MATRIX: ${{ env.WORKING_DIR }} | ||
jobs: | ||
setup: | ||
runs-on: "ubuntu-latest" | ||
outputs: | ||
MATRIX: ${{ env.WORKING_DIR }} | ||
|
||
# steps: | ||
# - name: π Checkout repository | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# ref: ${{ github.event.inputs.branchName }} | ||
steps: | ||
- name: π Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.inputs.branchName }} | ||
|
||
# - name: π οΈ Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
- name: π οΈ Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# build-and-deploy: | ||
# runs-on: "ubuntu-latest" | ||
# needs: setup | ||
# # strategy: | ||
# # matrix: | ||
# # directory: "users-management" | ||
build-and-deploy: | ||
runs-on: "ubuntu-latest" | ||
needs: setup | ||
# strategy: | ||
# matrix: | ||
# directory: "users-management" | ||
|
||
# steps: | ||
# - name: π Checkout repository | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# ref: ${{ github.event.inputs.branchName }} | ||
steps: | ||
- name: π Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branchName }} | ||
|
||
# - name: π Login to Azure | ||
# uses: azure/login@v1 | ||
# with: | ||
# creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
- name: π Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
# - name: ποΈ Login to Container Registry | ||
# uses: azure/docker-login@v1 | ||
# with: | ||
# login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} | ||
# username: ${{ secrets.AZ_USERNAME }} | ||
# password: ${{ secrets.AZ_PASSWORD }} | ||
- name: ποΈ Login to Container Registry | ||
uses: azure/docker-login@v1 | ||
with: | ||
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} | ||
username: ${{ secrets.AZ_USERNAME }} | ||
password: ${{ secrets.AZ_PASSWORD }} | ||
|
||
# - name: π Change Path Matrix Directory | ||
# run: | | ||
# CUSTOM_MATRIX_DIRECTORY=$(echo "${{ env.WORKING_DIR }}" | sed 's/\//./g') | ||
# echo "CUSTOM_MATRIX_DIRECTORY=$CUSTOM_MATRIX_DIRECTORY" >> "$GITHUB_ENV" | ||
- name: π Change Path Matrix Directory | ||
run: | | ||
CUSTOM_MATRIX_DIRECTORY=$(echo "${{ env.WORKING_DIR }}" | sed 's/\//./g') | ||
echo "CUSTOM_MATRIX_DIRECTORY=$CUSTOM_MATRIX_DIRECTORY" >> "$GITHUB_ENV" | ||
# - name: ποΈ Build and push Docker image to Azure Container Registry | ||
# run: | | ||
# ls | ||
# az acr build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{ env.WORKING_DIR }}:0.0.1 -r ${{ secrets.REGISTRY_LOGIN_SERVER }} --file ./${{ env.WORKING_DIR }}/Dockerfile ./${{ env.WORKING_DIR }} | ||
- name: ποΈ Build and push Docker image to Azure Container Registry | ||
run: | | ||
ls | ||
az acr build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{ env.WORKING_DIR }}:0.0.1 -r ${{ secrets.REGISTRY_LOGIN_SERVER }} --file ./${{ env.WORKING_DIR }}/Dockerfile ./${{ env.WORKING_DIR }} |
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