Skip to content

Commit 24b37e3

Browse files
committed
ci: Windows builds moved to GitHub Actions
Signed-off-by: Evan Wies <evan@neomantra.net>
1 parent 68c5981 commit 24b37e3

5 files changed

Lines changed: 131 additions & 4 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,130 @@ jobs:
392392
fi
393393
done
394394
395+
build-windows:
396+
runs-on: ${{ matrix.runner }}
397+
strategy:
398+
fail-fast: false
399+
matrix:
400+
include:
401+
- windows-version: ltsc2019
402+
runner: windows-2019
403+
install-tag: 4.8-windowsservercore-ltsc2019
404+
image-tag: 1809
405+
- windows-version: ltsc2022
406+
runner: windows-2022
407+
install-tag: 4.8-windowsservercore-ltsc2022
408+
image-tag: ltsc2022
409+
410+
steps:
411+
- name: Checkout
412+
uses: actions/checkout@v5
413+
414+
- name: Start Docker service
415+
run: |
416+
Start-Service docker
417+
docker info
418+
419+
- name: Login to GitHub Container Registry
420+
uses: docker/login-action@v3
421+
with:
422+
registry: ghcr.io
423+
username: ${{ secrets.GHCR_USERNAME }}
424+
password: ${{ secrets.GHCR_PASSWORD }}
425+
426+
- name: Login to Docker Hub (Mirror)
427+
if: vars.ENABLE_DOCKERHUB_MIRROR == 'true'
428+
uses: docker/login-action@v3
429+
with:
430+
registry: ${{ env.DOCKERHUB_REGISTRY }}
431+
username: ${{ secrets.DOCKER_USERNAME }}
432+
password: ${{ secrets.DOCKER_PASSWORD }}
433+
434+
- name: Build Windows image
435+
run: |
436+
docker build --pull `
437+
--build-arg RESTY_INSTALL_TAG=${{ matrix.install-tag }} `
438+
--build-arg RESTY_IMAGE_TAG=${{ matrix.image-tag }} `
439+
-t ${{ env.GHCR_IMAGE }}:windows-${{ matrix.windows-version }} `
440+
-f windows/Dockerfile .
441+
442+
- name: Smoke test
443+
run: docker run --rm ${{ env.GHCR_IMAGE }}:windows-${{ matrix.windows-version }} nginx -vt
444+
445+
- name: Extract metadata (tags)
446+
id: meta
447+
shell: bash
448+
run: |
449+
TAGS="${{ env.GHCR_IMAGE }}:windows-${{ matrix.windows-version }}"
450+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
451+
TAGS="$TAGS,${{ env.GHCR_IMAGE }}:${{ github.ref_name }}-windows-${{ matrix.windows-version }}"
452+
fi
453+
echo "tags=$TAGS" >> $GITHUB_OUTPUT
454+
455+
- name: Push to GHCR
456+
shell: bash
457+
run: |
458+
IFS=',' read -ra TAG_ARRAY <<< "${{ steps.meta.outputs.tags }}"
459+
for TAG in "${TAG_ARRAY[@]}"; do
460+
docker tag "${{ env.GHCR_IMAGE }}:windows-${{ matrix.windows-version }}" "$TAG"
461+
docker push "$TAG"
462+
done
463+
464+
- name: Push to Docker Hub Mirror
465+
if: vars.ENABLE_DOCKERHUB_MIRROR == 'true'
466+
shell: bash
467+
run: |
468+
IFS=',' read -ra TAG_ARRAY <<< "${{ steps.meta.outputs.tags }}"
469+
for TAG in "${TAG_ARRAY[@]}"; do
470+
MIRROR_TAG=$(echo "$TAG" | sed "s|${{ env.GHCR_IMAGE }}|${{ env.DOCKERHUB_IMAGE }}|")
471+
docker tag "${{ env.GHCR_IMAGE }}:windows-${{ matrix.windows-version }}" "$MIRROR_TAG"
472+
docker push "$MIRROR_TAG"
473+
done
474+
475+
manifest-windows:
476+
needs: build-windows
477+
runs-on: ubuntu-latest
478+
steps:
479+
- name: Checkout
480+
uses: actions/checkout@v5
481+
482+
- name: Set up Docker Buildx
483+
uses: docker/setup-buildx-action@v3
484+
485+
- name: Login to GitHub Container Registry
486+
uses: docker/login-action@v3
487+
with:
488+
registry: ghcr.io
489+
username: ${{ secrets.GHCR_USERNAME }}
490+
password: ${{ secrets.GHCR_PASSWORD }}
491+
492+
- name: Login to Docker Hub (Mirror)
493+
if: vars.ENABLE_DOCKERHUB_MIRROR == 'true'
494+
uses: docker/login-action@v3
495+
with:
496+
registry: ${{ env.DOCKERHUB_REGISTRY }}
497+
username: ${{ secrets.DOCKER_USERNAME }}
498+
password: ${{ secrets.DOCKER_PASSWORD }}
499+
500+
- name: Create and push Windows manifest
501+
run: |
502+
TAG_PREFIX=""
503+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
504+
TAG_PREFIX="${{ github.ref_name }}-"
505+
fi
506+
507+
docker buildx imagetools create \
508+
-t "${{ env.GHCR_IMAGE }}:${TAG_PREFIX}windows" \
509+
"${{ env.GHCR_IMAGE }}:${TAG_PREFIX}windows-ltsc2019" \
510+
"${{ env.GHCR_IMAGE }}:${TAG_PREFIX}windows-ltsc2022"
511+
512+
if [[ "${{ vars.ENABLE_DOCKERHUB_MIRROR }}" == "true" ]]; then
513+
docker buildx imagetools create \
514+
-t "${{ env.DOCKERHUB_IMAGE }}:${TAG_PREFIX}windows" \
515+
"${{ env.GHCR_IMAGE }}:${TAG_PREFIX}windows-ltsc2019" \
516+
"${{ env.GHCR_IMAGE }}:${TAG_PREFIX}windows-ltsc2022"
517+
fi
518+
395519
manifest-fat:
396520
needs: build-fat
397521
runs-on: ubuntu-latest

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ A test script `test-build-actions.sh` is provided to verify the build process lo
2424
- `test-build-actions.sh`: Build verification script.
2525

2626
## Historical Context
27-
- Previously used Travis CI (`.travis.yml` - removed).
28-
- Windows builds are/were handled by AppVeyor (`appveyor.yml` - still present).
27+
- Previously used Travis CI (`archive/dot_travis.yml` - removed).
28+
- Previously Windows builds were handled by AppVeyor (`archive/appveyor.yml`).

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
## 1.29.2.2-2 (2026-03-26)
55

6+
Thank you to [AppVeyor](https://www.appveyor.com) for many years of Windows builds! ❤️
7+
8+
* Windows builds moved from AppVeyor to GitHub Actions.
69
* `bookwork-fat` and `bullseye-fat` flavors now include build systems and LuaRocks (#295)
710

811
## 1.29.2.2-1 (2026-03-25)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# docker-openresty - Docker tooling for OpenResty
22

3-
[![Build Status](https://github.com/openresty/docker-openresty/actions/workflows/docker-publish.yml/badge.svg?branch=master)](https://github.com/openresty/docker-openresty/actions/workflows/docker-publish.yml) [![Appveyor status](https://ci.appveyor.com/api/projects/status/github/openresty/docker-openresty?branch=master&svg=true)](https://ci.appveyor.com/project/openresty/docker-openresty) [![](https://images.microbadger.com/badges/image/openresty/openresty.svg)](https://microbadger.com/#/images/openresty/openresty "microbadger.com")
3+
[![Build Status](https://github.com/openresty/docker-openresty/actions/workflows/docker-publish.yml/badge.svg?branch=master)](https://github.com/openresty/docker-openresty/actions/workflows/docker-publish.yml) [![](https://images.microbadger.com/badges/image/openresty/openresty.svg)](https://microbadger.com/#/images/openresty/openresty "microbadger.com")
44

55
`docker-openresty` is [Docker](https://www.docker.com) tooling for OpenResty (https://www.openresty.org).
66

@@ -118,7 +118,7 @@ The `openresty/openresty:latest` tag points to the latest `bookworm` image.
118118

119119
Since `1.19.3.2-1`, all flavors support multi-architecture builds, both `amd64` and `aarch64`. Since `1.21.4.1-1`, the `s390x` architecture is supported for build-from-source Ubuntu flavors (like `jammy`); prior to version `1.27.1.2-3`, [PCRE JIT](https://github.com/zherczeg/sljit/issues/89) is disabled for `s390x`.
120120

121-
Starting with `1.13.6.1`, releases are tagged with `<openresty-version>-<image-version>-<flavor>`. The latest `image-version` will also be tagged `<openresty-version>-<flavor>`. The HEAD of the master branch is also labeled plainly as `<flavor>`. The builds are managed by [GitHub Actions](https://github.com/openresty/docker-openresty/actions) and [Appveyor](https://ci.appveyor.com/project/openresty/docker-openresty) (for Windows images).
121+
Starting with `1.13.6.1`, releases are tagged with `<openresty-version>-<image-version>-<flavor>`. The latest `image-version` will also be tagged `<openresty-version>-<flavor>`. The HEAD of the master branch is also labeled plainly as `<flavor>`. The builds are managed by [GitHub Actions](https://github.com/openresty/docker-openresty/actions).
122122

123123
There are architecture-specific tags as well, `<openresty-version>-<image-version>-<flavor>-<arch>`, but one would generally pull from the multi-architecture name above.
124124

File renamed without changes.

0 commit comments

Comments
 (0)