Added Azure registry build action

This commit is contained in:
dotneft 2021-08-25 02:18:38 +03:00
parent 4aaa4f6f0f
commit d6ffab08c4
2 changed files with 26 additions and 6 deletions

1
.github/workflows/.#CI.yml vendored Symbolic link
View File

@ -0,0 +1 @@
dotneft@Alexeys-MacBook-Pro.local.10921

View File

@ -42,27 +42,46 @@ jobs:
- web-nginx-pgsql
os:
- alpine
# - ubuntu
# - ol
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Extract branch name
- name: Detect branch name
id: extract_branch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
echo "##[set-output name=release_version;]$(echo ${GITHUB_REF#refs/tags/})"
- name: ACR build
id: acr
- name: ACR build (all)
id: acr_push
uses: ams0/acr-task-github-action@v2
with:
service_principal: ${{ secrets.azure_service_principal }}
service_principal_password: ${{ secrets.azure_service_principal_password }}
tenant: ${{ secrets.azure_tenant }}
registry: ${{ secrets.azure_registry }}
repository: ${{ matrix.build }}
repository: ${{ matrix.os }}
image: zabbix-${{ matrix.build }}
folder: ${{ matrix.build }}/${{ matrix.os }}
branch: ${{ steps.extract_branch.outputs.branch }}
tag: ${{ steps.extract_branch.outputs.branch }}-${{ matrix.os }}
tag: ${{ steps.extract_branch.outputs.branch }}
dockerfile: Dockerfile
- name: ACR build (release)
if: github.event_name == 'release' && github.event.action == 'published'
id: acr_push
uses: ams0/acr-task-github-action@v2
with:
service_principal: ${{ secrets.azure_service_principal }}
service_principal_password: ${{ secrets.azure_service_principal_password }}
tenant: ${{ secrets.azure_tenant }}
registry: ${{ secrets.azure_registry }}
repository: ${{ matrix.os }}
image: zabbix-${{ matrix.build }}
folder: ${{ matrix.build }}/${{ matrix.os }}
branch: ${{ github.ref }}
tag: ${{ steps.extract_branch.outputs.release_version}}
dockerfile: Dockerfile