mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-05-31 23:26:16 +02:00
Updated nighly actions according GitHub standarts
This commit is contained in:
parent
84a01c3009
commit
b766dd9b82
90
.github/workflows/nightly_build.yml
vendored
90
.github/workflows/nightly_build.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
components: ${{ steps.components.outputs.list }}
|
components: ${{ steps.components.outputs.list }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -42,28 +42,28 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
os_list=$(jq -r '.["os-linux"] | keys | [ .[] | tostring ] | @json' "./build.json")
|
os_list=$(jq -r '.["os-linux"] | keys | [ .[] | tostring ] | @json' "./build.json")
|
||||||
|
|
||||||
echo "::set-output name=list::$os_list"
|
echo "list=$os_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Prepare Platform list
|
- name: Prepare Platform list
|
||||||
id: platform_list
|
id: platform_list
|
||||||
run: |
|
run: |
|
||||||
platform_list=$(jq -r '.["os-linux"] | tostring | @json' "./build.json")
|
platform_list=$(jq -r '.["os-linux"] | tostring | @json' "./build.json")
|
||||||
|
|
||||||
echo "::set-output name=list::$platform_list"
|
echo "list=$platform_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Prepare Database engine list
|
- name: Prepare Database engine list
|
||||||
id: database
|
id: database
|
||||||
run: |
|
run: |
|
||||||
database_list=$(jq -r '[.components | values[] ] | sort | unique | del(.. | select ( . == "" ) ) | [ .[] | tostring ] | @json' "./build.json")
|
database_list=$(jq -r '[.components | values[] ] | sort | unique | del(.. | select ( . == "" ) ) | [ .[] | tostring ] | @json' "./build.json")
|
||||||
|
|
||||||
echo "::set-output name=list::$database_list"
|
echo "list=$database_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Prepare Zabbix component list
|
- name: Prepare Zabbix component list
|
||||||
id: components
|
id: components
|
||||||
run: |
|
run: |
|
||||||
component_list=$(jq -r '.components | keys | [ .[] | tostring ] | @json' "./build.json")
|
component_list=$(jq -r '.components | keys | [ .[] | tostring ] | @json' "./build.json")
|
||||||
|
|
||||||
echo "::set-output name=list::$component_list"
|
echo "list=$component_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_base:
|
build_base:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@ -77,19 +77,24 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
with:
|
||||||
|
image: tonistiigi/binfmt:latest
|
||||||
|
platforms: all
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
driver-opts: image=moby/buildkit:master
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
@ -98,12 +103,13 @@ jobs:
|
|||||||
id: platform
|
id: platform
|
||||||
run: |
|
run: |
|
||||||
platform_list=$(jq -r '.["os-linux"].${{ matrix.os }} | join(",")' "./build.json")
|
platform_list=$(jq -r '.["os-linux"].${{ matrix.os }} | join(",")' "./build.json")
|
||||||
|
platform_list="${platform_list%,}"
|
||||||
|
|
||||||
echo ::set-output name=list::$platform_list
|
echo "list=$platform_list" >> $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 }}/zabbix-${{ env.BASE_BUILD_NAME }}
|
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ env.BASE_BUILD_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
@ -114,7 +120,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build ${{ env.BASE_BUILD_NAME }}/${{ matrix.os }} and push
|
- name: Build ${{ env.BASE_BUILD_NAME }}/${{ matrix.os }} and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: ./Dockerfiles/${{ env.BASE_BUILD_NAME }}/${{ matrix.os }}
|
context: ./Dockerfiles/${{ env.BASE_BUILD_NAME }}/${{ matrix.os }}
|
||||||
file: ./Dockerfiles/${{ env.BASE_BUILD_NAME }}/${{ matrix.os }}/Dockerfile
|
file: ./Dockerfiles/${{ env.BASE_BUILD_NAME }}/${{ matrix.os }}/Dockerfile
|
||||||
@ -131,7 +137,7 @@ jobs:
|
|||||||
echo "${{ steps.docker_build.outputs.digest }}" > ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
|
echo "${{ steps.docker_build.outputs.digest }}" > ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
|
||||||
|
|
||||||
- name: Upload SHA256 tag
|
- name: Upload SHA256 tag
|
||||||
uses: actions/upload-artifact@v2.2.4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
|
name: ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
|
||||||
path: ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
|
path: ${{ env.BASE_BUILD_NAME }}_${{ matrix.os }}
|
||||||
@ -150,19 +156,24 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
with:
|
||||||
|
image: tonistiigi/binfmt:latest
|
||||||
|
platforms: all
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
driver-opts: image=moby/buildkit:master
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
@ -171,12 +182,13 @@ jobs:
|
|||||||
id: platform
|
id: platform
|
||||||
run: |
|
run: |
|
||||||
platform_list=$(jq -r '.["os-linux"].${{ matrix.os }} | join(",")' "./build.json")
|
platform_list=$(jq -r '.["os-linux"].${{ matrix.os }} | join(",")' "./build.json")
|
||||||
|
platform_list="${platform_list%,}"
|
||||||
|
|
||||||
echo ::set-output name=list::$platform_list
|
echo "list=$platform_list" >> $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 }}/zabbix-${{ matrix.build }}
|
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
|
||||||
tags: |
|
tags: |
|
||||||
@ -186,7 +198,7 @@ jobs:
|
|||||||
latest=false
|
latest=false
|
||||||
|
|
||||||
- name: Download SHA256 tag build-base:${{ matrix.os }}
|
- name: Download SHA256 tag build-base:${{ matrix.os }}
|
||||||
uses: actions/download-artifact@v2.0.10
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-base_${{ matrix.os }}
|
name: build-base_${{ matrix.os }}
|
||||||
|
|
||||||
@ -196,12 +208,12 @@ jobs:
|
|||||||
BASE_TAG=$(cat build-base_${{ matrix.os }})
|
BASE_TAG=$(cat build-base_${{ matrix.os }})
|
||||||
BUILD_BASE_IMAGE=${{ env.DOCKER_REPOSITORY }}/zabbix-build-base@${BASE_TAG}
|
BUILD_BASE_IMAGE=${{ env.DOCKER_REPOSITORY }}/zabbix-build-base@${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 ${{ matrix.build }}/${{ matrix.os }} and push
|
- name: Build ${{ matrix.build }}/${{ matrix.os }} and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}
|
context: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}
|
||||||
file: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}/Dockerfile
|
file: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}/Dockerfile
|
||||||
@ -219,7 +231,7 @@ jobs:
|
|||||||
echo "${{ steps.docker_build.outputs.digest }}" > ${{ matrix.build }}_${{ matrix.os }}
|
echo "${{ steps.docker_build.outputs.digest }}" > ${{ matrix.build }}_${{ matrix.os }}
|
||||||
|
|
||||||
- name: Upload SHA256 tag
|
- name: Upload SHA256 tag
|
||||||
uses: actions/upload-artifact@v2.2.4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.build }}_${{ matrix.os }}
|
name: ${{ matrix.build }}_${{ matrix.os }}
|
||||||
path: ${{ matrix.build }}_${{ matrix.os }}
|
path: ${{ matrix.build }}_${{ matrix.os }}
|
||||||
@ -228,7 +240,7 @@ jobs:
|
|||||||
build_images:
|
build_images:
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
needs: [ "build_base_database", "init_build"]
|
needs: [ "build_base_database", "init_build"]
|
||||||
name: Build ${{ matrix.build }} base on ${{ matrix.os }}
|
name: Build ${{ matrix.build }} on ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -237,20 +249,24 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v2.3.4
|
|
||||||
with:
|
with:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
with:
|
||||||
|
image: tonistiigi/binfmt:latest
|
||||||
|
platforms: all
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
driver-opts: image=moby/buildkit:master
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
@ -280,18 +296,18 @@ jobs:
|
|||||||
|
|
||||||
platform_list="${platform_list%,}"
|
platform_list="${platform_list%,}"
|
||||||
|
|
||||||
echo ::set-output name=list::$platform_list
|
echo "list=$platform_list" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Detect Build Base Image
|
- name: Detect Build Base Image
|
||||||
id: build_base_image
|
id: build_base_image
|
||||||
run: |
|
run: |
|
||||||
BUILD_BASE=$(jq -r '.components."${{ matrix.build }}"' "./build.json")
|
BUILD_BASE=$(jq -r '.components."${{ matrix.build }}"' "./build.json")
|
||||||
|
|
||||||
echo ::set-output name=build_base::${BUILD_BASE}
|
echo "build_base=${BUILD_BASE}" >> $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 }}/zabbix-${{ matrix.build }}
|
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
|
||||||
tags: |
|
tags: |
|
||||||
@ -301,7 +317,7 @@ jobs:
|
|||||||
latest=false
|
latest=false
|
||||||
|
|
||||||
- name: Download SHA256 tag for ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.os }}
|
- name: Download SHA256 tag for ${{ steps.build_base_image.outputs.build_base }}:${{ matrix.os }}
|
||||||
uses: actions/download-artifact@v2.0.10
|
uses: actions/download-artifact@v3
|
||||||
if: ${{ matrix.build != 'snmptraps' }}
|
if: ${{ matrix.build != 'snmptraps' }}
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.build_base_image.outputs.build_base }}_${{ matrix.os }}
|
name: ${{ steps.build_base_image.outputs.build_base }}_${{ matrix.os }}
|
||||||
@ -313,12 +329,12 @@ jobs:
|
|||||||
BASE_TAG=$(cat ${{ steps.build_base_image.outputs.build_base }}_${{ matrix.os }})
|
BASE_TAG=$(cat ${{ steps.build_base_image.outputs.build_base }}_${{ matrix.os }})
|
||||||
BUILD_BASE_IMAGE=${{ env.DOCKER_REPOSITORY }}/zabbix-${{ steps.build_base_image.outputs.build_base }}@${BASE_TAG}
|
BUILD_BASE_IMAGE=${{ env.DOCKER_REPOSITORY }}/zabbix-${{ steps.build_base_image.outputs.build_base }}@${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 ${{ matrix.build }}/${{ matrix.os }} and push
|
- name: Build ${{ matrix.build }}/${{ matrix.os }} and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}
|
context: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}
|
||||||
file: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}/Dockerfile
|
file: ./Dockerfiles/${{ matrix.build }}/${{ matrix.os }}/Dockerfile
|
||||||
|
48
.github/workflows/nightly_build_windows.yml
vendored
48
.github/workflows/nightly_build_windows.yml
vendored
@ -27,7 +27,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:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -47,7 +47,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
|
||||||
@ -55,7 +55,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
|
||||||
@ -73,7 +73,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
|
||||||
@ -90,7 +90,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:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -108,7 +108,7 @@ jobs:
|
|||||||
|
|
||||||
- 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: |
|
||||||
@ -122,6 +122,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$context='.\Dockerfiles\${{ env.BASE_BUILD_NAME }}\windows\'
|
$context='.\Dockerfiles\${{ env.BASE_BUILD_NAME }}\windows\'
|
||||||
$dockerfile= $context + 'Dockerfile.${{ matrix.component }}'
|
$dockerfile= $context + 'Dockerfile.${{ matrix.component }}'
|
||||||
|
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||||
|
Remove-Item -ErrorAction Ignore -Force -Path $context\README.md
|
||||||
|
|
||||||
$tags_array=$( "${{ steps.meta.outputs.tags }}".Split("`r`n") )
|
$tags_array=$( "${{ steps.meta.outputs.tags }}".Split("`r`n") )
|
||||||
$tags=$( $tags_array | Foreach-Object { "--tag=$_" } )
|
$tags=$( $tags_array | Foreach-Object { "--tag=$_" } )
|
||||||
@ -159,7 +161,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload SHA256 tag
|
- name: Upload SHA256 tag
|
||||||
if: ${{ env.AUTO_PUSH_IMAGES }}
|
if: ${{ env.AUTO_PUSH_IMAGES }}
|
||||||
uses: actions/upload-artifact@v2.2.4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
name: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
||||||
path: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
path: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
||||||
@ -186,7 +188,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:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -200,11 +202,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" >> $Env: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: |
|
||||||
@ -214,7 +216,7 @@ jobs:
|
|||||||
latest=false
|
latest=false
|
||||||
|
|
||||||
- name: Download SHA256 tag build-base:${{ matrix.os }}
|
- name: Download SHA256 tag build-base:${{ matrix.os }}
|
||||||
uses: actions/download-artifact@v2.0.10
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
name: ${{ env.BASE_BUILD_NAME }}${{ env.BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
||||||
|
|
||||||
@ -224,14 +226,16 @@ 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" >> $Env:GITHUB_OUTPUT
|
||||||
echo "::set-output name=base_build_image::$build_base_image"
|
echo "base_build_image=$build_base_image" >> $Env:GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
id: docker_build
|
id: docker_build
|
||||||
run: |
|
run: |
|
||||||
$context='.\Dockerfiles\${{ env.COMPONENT_BASE_BUILD_NAME }}\windows\'
|
$context='.\Dockerfiles\${{ env.COMPONENT_BASE_BUILD_NAME }}\windows\'
|
||||||
$dockerfile= $context + 'Dockerfile.${{ matrix.component }}'
|
$dockerfile= $context + 'Dockerfile.${{ matrix.component }}'
|
||||||
|
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||||
|
Remove-Item -ErrorAction Ignore -Force -Path $context\README.md
|
||||||
|
|
||||||
$tags_array=$( "${{ steps.meta.outputs.tags }}".Split("`r`n") )
|
$tags_array=$( "${{ steps.meta.outputs.tags }}".Split("`r`n") )
|
||||||
$tags=$($tags_array | Foreach-Object { "--tag=$_" })
|
$tags=$($tags_array | Foreach-Object { "--tag=$_" })
|
||||||
@ -269,7 +273,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload SHA256 tag
|
- name: Upload SHA256 tag
|
||||||
if: ${{ env.AUTO_PUSH_IMAGES }}
|
if: ${{ env.AUTO_PUSH_IMAGES }}
|
||||||
uses: actions/upload-artifact@v2.2.4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
name: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
||||||
path: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
path: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
||||||
@ -294,7 +298,7 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: "refs/heads/trunk"
|
ref: "refs/heads/trunk"
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
@ -308,21 +312,21 @@ 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" >> $Env: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: |
|
||||||
type=raw,value=${{ steps.base_os_tag.outputs.os_tag }}-trunk
|
type=raw,value=${{ steps.base_os_tag.outputs.os_tag }}-trunk
|
||||||
type=raw,value=trunk-${{ steps.base_os_tag.outputs.os_tag }}
|
type=raw,value=trunk-${{ steps.base_os_tag.outputs.os_tag }}
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=false
|
||||||
|
|
||||||
- name: Download SHA256 tag for ${{ env.COMPONENT_BASE_BUILD_NAME }}:${{ matrix.os }}
|
- name: Download SHA256 tag for ${{ env.COMPONENT_BASE_BUILD_NAME }}:${{ matrix.os }}
|
||||||
uses: actions/download-artifact@v2.0.10
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
name: ${{ env.COMPONENT_BASE_BUILD_NAME }}${{ env.COMPONENT_BASE_BUILD_ARTIFACT_FILE_SUFFIX }}
|
||||||
|
|
||||||
@ -332,14 +336,16 @@ 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" >> $Env:GITHUB_OUTPUT
|
||||||
echo "::set-output name=base_build_image::$build_base_image"
|
echo "base_build_image=$build_base_image" >> $Env:GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
id: docker_build
|
id: docker_build
|
||||||
run: |
|
run: |
|
||||||
$context='.\Dockerfiles\${{ matrix.component }}\windows\'
|
$context='.\Dockerfiles\${{ matrix.component }}\windows\'
|
||||||
$dockerfile= $context + 'Dockerfile'
|
$dockerfile= $context + 'Dockerfile'
|
||||||
|
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||||
|
Remove-Item -ErrorAction Ignore -Force -Path $context\README.md
|
||||||
|
|
||||||
$tags_array=$( "${{ steps.meta.outputs.tags }}".Split("`r`n") )
|
$tags_array=$( "${{ steps.meta.outputs.tags }}".Split("`r`n") )
|
||||||
$tags=$($tags_array | Foreach-Object { "--tag=$_" })
|
$tags=$($tags_array | Foreach-Object { "--tag=$_" })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user