mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-29 03:03:10 +01:00
88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
name: Azure
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
push:
|
|
branches:
|
|
- '5.0'
|
|
- '5.4'
|
|
paths-ignore:
|
|
- '.env*'
|
|
- 'docker-compose*.yaml'
|
|
- '*/rhel/*'
|
|
- "**.md"
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 70
|
|
env:
|
|
LATEST_BRANCH: "${{ github.event.repository.default_branch }}"
|
|
DOCKER_REPOSITORY: "zabbix"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build:
|
|
- agent
|
|
- agent2
|
|
- java-gateway
|
|
- proxy-mysql
|
|
- proxy-sqlite3
|
|
- server-mysql
|
|
- server-pgsql
|
|
- snmptraps
|
|
- web-apache-mysql
|
|
- web-apache-pgsql
|
|
- web-nginx-mysql
|
|
- web-nginx-pgsql
|
|
os:
|
|
- alpine
|
|
# - ubuntu
|
|
# - ol
|
|
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Detect branch name
|
|
id: extract_branch
|
|
shell: bash
|
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
echo "##[set-output name=release_version;]$(echo ${GITHUB_REF#refs/tags/})"
|
|
|
|
- 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.os }}
|
|
image: zabbix-${{ matrix.build }}
|
|
folder: ${{ matrix.build }}/${{ matrix.os }}
|
|
branch: ${{ steps.extract_branch.outputs.branch }}
|
|
tag: v${{ steps.extract_branch.outputs.branch }}
|
|
dockerfile: Dockerfile
|
|
|
|
- name: ACR build (release)
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
id: acr_release
|
|
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: v${{ steps.extract_branch.outputs.release_version}}
|
|
dockerfile: Dockerfile
|