Updated windows workflow according new github recommendations

This commit is contained in:
Alexey Pustovalov 2023-02-03 14:09:50 +09:00
parent 1511a268fe
commit 53af3e092a

View File

@ -37,7 +37,7 @@ jobs:
is_default_branch: ${{ steps.branch_info.outputs.is_default_branch }}
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
with:
fetch-depth: 1
@ -56,7 +56,7 @@ jobs:
run: |
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
id: components
@ -64,7 +64,7 @@ jobs:
run: |
component_list='["agent","agent2"]'
echo "::set-output name=list::$component_list"
echo "list=$component_list" >> $GITHUB_OUTPUT
- name: Get branch info
id: branch_info
@ -82,7 +82,7 @@ jobs:
if [[ "$github_ref" == "${{ env.LATEST_BRANCH }}" ]]; then
result=true
fi
echo "::set-output name=is_default_branch::$result"
echo "is_default_branch=$result" >> $GITHUB_OUTPUT
build_base:
timeout-minutes: 70
@ -99,7 +99,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
with:
fetch-depth: 1
@ -112,11 +112,11 @@ jobs:
id: base_os_tag
run: |
$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
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.BASE_BUILD_NAME }}
tags: |
@ -197,7 +197,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
- name: Login to DockerHub
run: |
@ -208,11 +208,11 @@ jobs:
id: base_os_tag
run: |
$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
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ env.COMPONENT_BASE_BUILD_NAME }}
tags: |
@ -235,8 +235,8 @@ jobs:
$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
echo "::set-output name=base_tag::$base_tag"
echo "::set-output name=base_build_image::$build_base_image"
echo "base_tag=$base_tag" >> $GITHUB_OUTPUT
echo "base_build_image=$build_base_image" >> $GITHUB_OUTPUT
- name: Build image
id: docker_build
@ -305,7 +305,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
- name: Login to DockerHub
run: |
@ -316,11 +316,11 @@ jobs:
id: base_os_tag
run: |
$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
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGE_PREFIX }}${{ matrix.component }}
tags: |
@ -343,8 +343,8 @@ jobs:
$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
echo "::set-output name=base_tag::$base_tag"
echo "::set-output name=base_build_image::$build_base_image"
echo "base_tag=$base_tag" >> $GITHUB_OUTPUT
echo "base_build_image=$build_base_image" >> $GITHUB_OUTPUT
- name: Build image
id: docker_build