mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-02-17 02:10:49 +01:00
Updated windows workflow according new github recommendations
This commit is contained in:
parent
949ff0ea1c
commit
945bddcd39
34
.github/workflows/images_build_windows.yml
vendored
34
.github/workflows/images_build_windows.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
|||||||
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
|
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
os_list=$(jq -r '.["os-windows"] | keys | [ .[] | tostring ] | @json' "./build.json")
|
os_list=$(jq -r '.["os-windows"] | keys | [ .[] | tostring ] | @json' "./build.json")
|
||||||
|
|
||||||
echo "::set-output name=list::$os_list"
|
echo "list=$os_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Prepare Zabbix component list
|
- name: Prepare Zabbix component list
|
||||||
id: components
|
id: components
|
||||||
@ -65,7 +65,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
component_list='["agent","agent2"]'
|
component_list='["agent","agent2"]'
|
||||||
|
|
||||||
echo "::set-output name=list::$component_list"
|
echo "list=$component_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Get branch info
|
- name: Get branch info
|
||||||
id: branch_info
|
id: branch_info
|
||||||
@ -83,7 +83,7 @@ jobs:
|
|||||||
if [[ "$github_ref" == "${{ env.LATEST_BRANCH }}" ]]; then
|
if [[ "$github_ref" == "${{ env.LATEST_BRANCH }}" ]]; then
|
||||||
result=true
|
result=true
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=is_default_branch::$result"
|
echo "is_default_branch=$result" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_base:
|
build_base:
|
||||||
timeout-minutes: 70
|
timeout-minutes: 70
|
||||||
@ -100,7 +100,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
@ -113,11 +113,11 @@ jobs:
|
|||||||
id: base_os_tag
|
id: base_os_tag
|
||||||
run: |
|
run: |
|
||||||
$os_tag=$(Get-Content -Path .\build.json | ConvertFrom-Json).'os-windows'.'${{ matrix.os }}'
|
$os_tag=$(Get-Content -Path .\build.json | ConvertFrom-Json).'os-windows'.'${{ matrix.os }}'
|
||||||
echo "::set-output name=os_tag::$os_tag"
|
echo "os_tag=$os_tag" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Generate tags
|
- name: Generate tags
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.BASE_BUILD_NAME }}
|
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.BASE_BUILD_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
@ -195,7 +195,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
run: |
|
run: |
|
||||||
@ -206,11 +206,11 @@ jobs:
|
|||||||
id: base_os_tag
|
id: base_os_tag
|
||||||
run: |
|
run: |
|
||||||
$os_tag=$(Get-Content -Path .\build.json | ConvertFrom-Json).'os-windows'.'${{ matrix.os }}'
|
$os_tag=$(Get-Content -Path .\build.json | ConvertFrom-Json).'os-windows'.'${{ matrix.os }}'
|
||||||
echo "::set-output name=os_tag::$os_tag"
|
echo "os_tag=$os_tag" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Generate tags
|
- name: Generate tags
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.COMPONENT_BASE_BUILD_NAME }}
|
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.COMPONENT_BASE_BUILD_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
@ -230,8 +230,8 @@ jobs:
|
|||||||
$base_tag = Get-Content ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }} -Raw
|
$base_tag = Get-Content ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }} -Raw
|
||||||
$build_base_image="${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.BASE_BUILD_NAME }}@" + $base_tag
|
$build_base_image="${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.BASE_BUILD_NAME }}@" + $base_tag
|
||||||
|
|
||||||
echo "::set-output name=base_tag::$base_tag"
|
echo "base_tag=$base_tag" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=base_build_image::$build_base_image"
|
echo "base_build_image=$build_base_image" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
id: docker_build
|
id: docker_build
|
||||||
@ -300,7 +300,7 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
run: |
|
run: |
|
||||||
@ -311,11 +311,11 @@ jobs:
|
|||||||
id: base_os_tag
|
id: base_os_tag
|
||||||
run: |
|
run: |
|
||||||
$os_tag=$(Get-Content -Path .\build.json | ConvertFrom-Json).'os-windows'.'${{ matrix.os }}'
|
$os_tag=$(Get-Content -Path .\build.json | ConvertFrom-Json).'os-windows'.'${{ matrix.os }}'
|
||||||
echo "::set-output name=os_tag::$os_tag"
|
echo "os_tag=$os_tag" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Generate tags
|
- name: Generate tags
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ matrix.component }}
|
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ matrix.component }}
|
||||||
tags: |
|
tags: |
|
||||||
@ -335,8 +335,8 @@ jobs:
|
|||||||
$base_tag = Get-Content ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }} -Raw
|
$base_tag = Get-Content ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }} -Raw
|
||||||
$build_base_image="${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.COMPONENT_BASE_BUILD_NAME }}@" + $base_tag
|
$build_base_image="${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.COMPONENT_BASE_BUILD_NAME }}@" + $base_tag
|
||||||
|
|
||||||
echo "::set-output name=base_tag::$base_tag"
|
echo "base_tag=$base_tag" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=base_build_image::$build_base_image"
|
echo "base_build_image=$build_base_image" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
id: docker_build
|
id: docker_build
|
||||||
|
Loading…
Reference in New Issue
Block a user