diff --git a/.drone.yml b/.drone.yml index b7fc997..4c88a7b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,6 +31,49 @@ trigger: - "refs/tags/**" - "refs/pull/**" +--- +kind: pipeline +type: vm +name: windows-1809 + +pool: + use: windows + +platform: + os: windows + arch: amd64 + +steps: + - name: go build + image: golang:1.19 + environment: + CGO_ENABLED: 0 + commands: + - go build -o release/windows/amd64/buildx-gar.exe ./cmd/drone-buildx-gar + - name: build gar plugin + image: plugins/docker:20.17.4-windows-1809-amd64 + settings: + dockerfile: docker/gar/Dockerfile.windows.amd64.1809 + repo: plugins/buildx-gar + username: + from_secret: docker_username + password: + from_secret: docker_password + auto_tag: true + auto_tag_suffix: windows-1809-amd64 + purge: false + when: + event: [push, tag] + +depends_on: + - testing + +trigger: + ref: + - refs/heads/main + - refs/tags/* + - "refs/pull/**" + --- kind: pipeline type: vm diff --git a/docker/gar/Dockerfile.windows.amd64.1809 b/docker/gar/Dockerfile.windows.amd64.1809 new file mode 100644 index 0000000..2175540 --- /dev/null +++ b/docker/gar/Dockerfile.windows.amd64.1809 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/buildx:windows-1809-amd64 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone GAR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/buildx-gar.exe C:/bin/buildx-gar.exe +ENTRYPOINT [ "C:\\bin\\buildx-gar.exe" ] \ No newline at end of file diff --git a/docker/gar/manifest.tmpl b/docker/gar/manifest.tmpl index 3d8c3a4..3be9fda 100644 --- a/docker/gar/manifest.tmpl +++ b/docker/gar/manifest.tmpl @@ -17,6 +17,12 @@ manifests: architecture: arm64 os: linux variant: v8 + - + image: plugins/buildx-gar:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 + platform: + architecture: amd64 + os: windows + version: 1809 - image: plugins/buildx-gar:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-ltsc2022-amd64 platform: