mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-23 05:48:46 +01:00
Prepare universal workflow
This commit is contained in:
parent
64fe8a0e05
commit
0911433644
10
.github/workflows/images_build_windows.yml
vendored
10
.github/workflows/images_build_windows.yml
vendored
@ -144,9 +144,10 @@ jobs:
|
||||
run: cosign version
|
||||
|
||||
- name: Login to DockerHub
|
||||
run: |
|
||||
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
|
||||
if (-not $?) {throw "Failed"}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Base OS tag
|
||||
id: base_os_tag
|
||||
@ -185,7 +186,6 @@ jobs:
|
||||
LABEL_REVISION: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||
LABEL_CREATED: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||
run: |
|
||||
Set-PSDebug -Trace 1
|
||||
$context="$Env:DOCKERFILES_DIRECTORY\$Env:BASE_BUILD_NAME\windows\"
|
||||
$dockerfile= $context + 'Dockerfile.' + $Env:MATRIX_COMPONENT
|
||||
# Can not build on GitHub due existing symlink. Must be removed before build process
|
||||
@ -194,6 +194,8 @@ jobs:
|
||||
$tags_array=$( "$Env:TAGS".Split("`n") )
|
||||
$tags=$( $tags_array | Foreach-Object { "--tag=$_" } )
|
||||
|
||||
echo "docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION --label org.opencontainers.image.created=$Env:LABEL_CREATED --build-arg=BUILD_BASE_IMAGE=$Env:BASE_BUILD_IMAGE:$Env:BASE_OS_TAG --file=$dockerfile $tags $context"
|
||||
|
||||
docker build --label org.opencontainers.image.revision=$Env:LABEL_REVISION `
|
||||
--label org.opencontainers.image.created=$Env:LABEL_CREATED `
|
||||
--build-arg=BUILD_BASE_IMAGE=$Env:BASE_BUILD_IMAGE:$Env:BASE_OS_TAG `
|
||||
|
Loading…
Reference in New Issue
Block a user