Skip to content

Instantly share code, notes, and snippets.

@sozercan
Created February 21, 2025 00:21
Show Gist options
  • Save sozercan/df04b5d4fd0c16b094f913dd7e78c05e to your computer and use it in GitHub Desktop.
Save sozercan/df04b5d4fd0c16b094f913dd7e78c05e to your computer and use it in GitHub Desktop.
Dalec Windows Example
# syntax=ghcr.io/azure/dalec/frontend:0.12
args:
VERSION: 1.0.0
COMMIT: 32022caedd6a177a7717aa8680cbe179e1045935
REVISION: 1
TARGETOS:
name: fake-test-project
packager: Azure Container Upstream
vendor: Microsoft Corporation
license: Apache-2.0
website: https://github.com/golang/example
description: Fake project to use when testing workflows
version: ${VERSION}
revision: ${REVISION}
sources:
example:
generate:
- gomod: {}
git:
url: https://github.com/golang/example.git
commit: ${COMMIT}
build:
env:
VERSION: ${VERSION}
GOPROXY: direct
OS: ${TARGETOS}
steps:
- command: |
cd example/hello
GOOS=${OS} go build -o bin/hello.exe .
image:
entrypoint: hello.exe
bases:
- rootfs:
image:
ref: mcr.microsoft.com/windows/nanoserver:1809
- rootfs:
image:
ref: mcr.microsoft.com/windows/nanoserver:ltsc2025
- rootfs:
image:
ref: mcr.microsoft.com/windows/nanoserver:ltsc2022
targets:
windowscross:
dependencies:
build:
golang:
artifacts:
binaries:
example/hello/bin/hello.exe: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment