From fd31038cb7dda0e62ce4c8f676d870b64889a6cf Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Wed, 4 Mar 2026 13:37:46 -0500 Subject: [PATCH 1/5] patch: migrate to gitea actions --- .gitea/workflows/pr.yml | 108 ++++++++++++++++++++++++++++++++++++++ .gitea/workflows/push.yml | 59 +++++++++++++++++++++ .woodpecker/pr.yml | 41 --------------- .woodpecker/push.yml | 36 ------------- 4 files changed, 167 insertions(+), 77 deletions(-) create mode 100644 .gitea/workflows/pr.yml create mode 100644 .gitea/workflows/push.yml delete mode 100644 .woodpecker/pr.yml delete mode 100644 .woodpecker/push.yml diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml new file mode 100644 index 0000000..c303b44 --- /dev/null +++ b/.gitea/workflows/pr.yml @@ -0,0 +1,108 @@ +name: PR + +on: + pull_request: + +jobs: + install: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Upload node_modules + uses: actions/upload-artifact@v7 + with: + name: node-modules + path: node_modules/ + + lint: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + cache: "npm" + + - name: Restore node_modules + uses: actions/download-artifact@v8 + with: + name: node-modules + + - name: Run lint + run: npm run lint + + test: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + cache: "npm" + + - name: Restore node_modules + uses: actions/download-artifact@v8 + with: + name: node-modules + + - name: Run tests + run: npm run test + + e2e: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + cache: "npm" + + - name: Restore node_modules + uses: actions/download-artifact@v8 + with: + name: node-modules + + - name: Install Playwright browsers + run: npx playwright install --with-deps chromium + + - name: Generate dev cert + run: ./scripts/gen-dev-cert.sh + + - name: Run e2e tests + run: npm run test:e2e + env: + NODE_TLS_REJECT_UNAUTHORIZED: "0" + + docker-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build (dry run) + uses: docker/build-push-action@v6 + with: + context: . + push: false + tags: ${{ github.server_url }}/${{ github.repository }}:latest diff --git a/.gitea/workflows/push.yml b/.gitea/workflows/push.yml new file mode 100644 index 0000000..301d1ad --- /dev/null +++ b/.gitea/workflows/push.yml @@ -0,0 +1,59 @@ +name: Push + +on: + push: + branches: [main] + +jobs: + release-docker-helm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + token: ${{ secrets.GITEA_REPO_TOKEN }} + + - name: Release (bump, tag, push, create release) + env: + CI_REPO_OWNER: ${{ github.actor }} + CI_REPO_NAME: ${{ github.event.repository.name }} + CI_FORGE_URL: ${{ github.server_url }} + CI_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + GITEA_REPO_TOKEN: ${{ secrets.GITEA_REPO_TOKEN }} + run: | + sudo apt-get update -qq && sudo apt-get install -y -qq git wget + ./scripts/release.sh + + - name: Log in to container registry + run: | + REGISTRY="${GITHUB_SERVER_URL#https://}" + echo "${{ secrets.GITEA_REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.actor }}" --password-stdin + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + uses: docker/build-push-action@v6 + with: + context: . + load: true + tags: kestrelos:built + + - name: Push Docker image (all tags from .tags) + run: | + REGISTRY="${GITHUB_SERVER_URL#https://}" + IMAGE="$REGISTRY/${{ github.repository }}" + while read -r tag; do + docker tag kestrelos:built "$IMAGE:$tag" + docker push "$IMAGE:$tag" + done < .tags + + - name: Package and push Helm chart + env: + GITEA_REGISTRY_TOKEN: ${{ secrets.GITEA_REGISTRY_TOKEN }} + run: | + curl -sSfL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + helm package helm/kestrelos + for f in kestrelos-*.tgz; do + curl -sf -u "${{ github.actor }}:$GITEA_REGISTRY_TOKEN" -X POST --upload-file "$f" \ + "${{ github.server_url }}/api/packages/${{ github.actor }}/helm/api/charts" + done diff --git a/.woodpecker/pr.yml b/.woodpecker/pr.yml deleted file mode 100644 index fcb310a..0000000 --- a/.woodpecker/pr.yml +++ /dev/null @@ -1,41 +0,0 @@ -when: - - event: pull_request - -steps: - - name: install - image: node:24-slim - depends_on: [] - commands: - - npm ci - - - name: lint - image: node:24-slim - depends_on: [install] - commands: - - npm run lint - - - name: test - image: node:24-slim - depends_on: [install] - commands: - - npm run test - - - name: e2e - image: mcr.microsoft.com/playwright:v1.58.2-noble - depends_on: [install] - commands: - - ./scripts/gen-dev-cert.sh - - npm run test:e2e - environment: - NODE_TLS_REJECT_UNAUTHORIZED: "0" - - - name: docker-build - image: woodpeckerci/plugin-kaniko - depends_on: [] - settings: - repo: ${CI_REPO_OWNER}/${CI_REPO_NAME} - registry: git.keligrubb.com - tags: latest - dry-run: true - single-snapshot: true - cleanup: true diff --git a/.woodpecker/push.yml b/.woodpecker/push.yml deleted file mode 100644 index f7c588e..0000000 --- a/.woodpecker/push.yml +++ /dev/null @@ -1,36 +0,0 @@ -when: - - event: push - branch: main - -steps: - - name: release - image: alpine - commands: - - apk add --no-cache git - - ./scripts/release.sh - environment: - GITEA_REPO_TOKEN: - from_secret: gitea_repo_token - - - name: docker - image: woodpeckerci/plugin-kaniko - depends_on: [release] - settings: - repo: ${CI_REPO_OWNER}/${CI_REPO_NAME} - registry: git.keligrubb.com - username: ${CI_REPO_OWNER} - password: - from_secret: gitea_registry_token - single-snapshot: true - cleanup: true - - - name: helm - image: alpine/helm - depends_on: [release] - environment: - GITEA_REGISTRY_TOKEN: - from_secret: gitea_registry_token - commands: - - apk add --no-cache curl - - helm package helm/kestrelos - - curl -sf -u $CI_REPO_OWNER:$GITEA_REGISTRY_TOKEN -X POST --upload-file kestrelos-*.tgz https://git.keligrubb.com/api/packages/$CI_REPO_OWNER/helm/api/charts -- 2.49.1 From 60304c09da5a18bde65c7b6c601e0f9c5a6d184f Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Wed, 4 Mar 2026 14:16:25 -0500 Subject: [PATCH 2/5] cleanup ci stages --- .gitea/workflows/pr.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index c303b44..541745d 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -19,7 +19,7 @@ jobs: run: npm ci - name: Upload node_modules - uses: actions/upload-artifact@v7 + uses: https://gitea.com/actions/gitea-upload-artifact@main with: name: node-modules path: node_modules/ @@ -37,7 +37,7 @@ jobs: cache: "npm" - name: Restore node_modules - uses: actions/download-artifact@v8 + uses: https://github.com/ChristopherHX/gitea-download-artifact@main with: name: node-modules @@ -57,7 +57,7 @@ jobs: cache: "npm" - name: Restore node_modules - uses: actions/download-artifact@v8 + uses: https://github.com/ChristopherHX/gitea-download-artifact@main with: name: node-modules @@ -77,7 +77,7 @@ jobs: cache: "npm" - name: Restore node_modules - uses: actions/download-artifact@v8 + uses: https://github.com/ChristopherHX/gitea-download-artifact@main with: name: node-modules @@ -97,6 +97,13 @@ jobs: steps: - uses: actions/checkout@v6 + - name: Set Docker image tag + id: image + run: | + REGISTRY="${GITHUB_SERVER_URL#https://}" + REGISTRY="${REGISTRY#http://}" + echo "tag=${REGISTRY}/${{ github.repository }}:latest" >> $GITHUB_OUTPUT + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -105,4 +112,4 @@ jobs: with: context: . push: false - tags: ${{ github.server_url }}/${{ github.repository }}:latest + tags: ${{ steps.image.outputs.tag }} -- 2.49.1 From f6607f6d4145ffd0ea105ddf995508a36569f210 Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Wed, 4 Mar 2026 14:23:41 -0500 Subject: [PATCH 3/5] wrong cache name --- .gitea/workflows/pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index 541745d..a145f3d 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -21,7 +21,7 @@ jobs: - name: Upload node_modules uses: https://gitea.com/actions/gitea-upload-artifact@main with: - name: node-modules + name: node_modules path: node_modules/ lint: @@ -39,7 +39,7 @@ jobs: - name: Restore node_modules uses: https://github.com/ChristopherHX/gitea-download-artifact@main with: - name: node-modules + name: node_modules - name: Run lint run: npm run lint @@ -59,7 +59,7 @@ jobs: - name: Restore node_modules uses: https://github.com/ChristopherHX/gitea-download-artifact@main with: - name: node-modules + name: node_modules - name: Run tests run: npm run test @@ -79,7 +79,7 @@ jobs: - name: Restore node_modules uses: https://github.com/ChristopherHX/gitea-download-artifact@main with: - name: node-modules + name: node_modules - name: Install Playwright browsers run: npx playwright install --with-deps chromium -- 2.49.1 From 8f2f3aeb88218f16575324c404cb3350df117a6c Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Wed, 4 Mar 2026 14:30:18 -0500 Subject: [PATCH 4/5] fetch ci each stage --- .gitea/workflows/pr.yml | 39 +++++---------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index a145f3d..f9bd4b3 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -4,7 +4,7 @@ on: pull_request: jobs: - install: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -18,35 +18,11 @@ jobs: - name: Install dependencies run: npm ci - - name: Upload node_modules - uses: https://gitea.com/actions/gitea-upload-artifact@main - with: - name: node_modules - path: node_modules/ - - lint: - runs-on: ubuntu-latest - needs: install - steps: - - uses: actions/checkout@v6 - - - name: Setup Node.js - uses: actions/setup-node@v6 - with: - node-version: "24" - cache: "npm" - - - name: Restore node_modules - uses: https://github.com/ChristopherHX/gitea-download-artifact@main - with: - name: node_modules - - name: Run lint run: npm run lint test: runs-on: ubuntu-latest - needs: install steps: - uses: actions/checkout@v6 @@ -56,17 +32,14 @@ jobs: node-version: "24" cache: "npm" - - name: Restore node_modules - uses: https://github.com/ChristopherHX/gitea-download-artifact@main - with: - name: node_modules + - name: Install dependencies + run: npm ci - name: Run tests run: npm run test e2e: runs-on: ubuntu-latest - needs: install steps: - uses: actions/checkout@v6 @@ -76,10 +49,8 @@ jobs: node-version: "24" cache: "npm" - - name: Restore node_modules - uses: https://github.com/ChristopherHX/gitea-download-artifact@main - with: - name: node_modules + - name: Install dependencies + run: npm ci - name: Install Playwright browsers run: npx playwright install --with-deps chromium -- 2.49.1 From fee29b72bac6c0cefa05d1ddae6915e20fbfc157 Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Wed, 4 Mar 2026 14:43:02 -0500 Subject: [PATCH 5/5] try using official playwright container for e2e testing --- .gitea/workflows/pr.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index f9bd4b3..452e99e 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -40,6 +40,8 @@ jobs: e2e: runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.58.2-noble steps: - uses: actions/checkout@v6 @@ -52,9 +54,6 @@ jobs: - name: Install dependencies run: npm ci - - name: Install Playwright browsers - run: npx playwright install --with-deps chromium - - name: Generate dev cert run: ./scripts/gen-dev-cert.sh -- 2.49.1