From a9328043b7f5e0b127fe8dea28429c1eca137160 Mon Sep 17 00:00:00 2001 From: Robin Dittmar Date: Wed, 9 Sep 2026 17:06:19 +0200 Subject: [PATCH 1/2] feat: moved parts of CI/CD to pull requests, rather than after merging --- .gitea/workflows/deploy.yml | 24 ++------------------- .gitea/workflows/pr-checks.yml | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 .gitea/workflows/pr-checks.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f28c81e..6a160aa 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -15,35 +15,15 @@ jobs: build-and-deploy: runs-on: ubuntu-latest container: - image: golang:1.27-bookworm + image: node:24-bookworm steps: - name: Install system dependencies run: | - apt-get update && apt-get install -y --no-install-recommends git openssh-client curl - curl -fsSL https://deb.nodesource.com/setup_24.x | bash - - apt-get install -y nodejs + apt-get update && apt-get install -y --no-install-recommends openssh-client - name: Checkout uses: actions/checkout@v4 - - name: Lint - run: make lint - - - name: Check formatting - run: | - unformatted=$(gofmt -l .) - if [ -n "$unformatted" ]; then - echo "Not gofmt'd:" - echo "$unformatted" - exit 1 - fi - - - name: Test - run: make test - - - name: Build - run: make build - - name: Configure SSH env: DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} diff --git a/.gitea/workflows/pr-checks.yml b/.gitea/workflows/pr-checks.yml new file mode 100644 index 0000000..68915e3 --- /dev/null +++ b/.gitea/workflows/pr-checks.yml @@ -0,0 +1,39 @@ +name: PR Checks + +on: + pull_request: + branches: + - main + +jobs: + lint-test-and-build: + runs-on: ubuntu-latest + container: + image: golang:1.27-bookworm + steps: + - name: Install system dependencies + run: | + apt-get update && apt-get install -y --no-install-recommends git openssh-client curl + curl -fsSL https://deb.nodesource.com/setup_24.x | bash - + apt-get install -y nodejs + + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint + run: make lint + + - name: Check formatting + run: | + unformatted=$(gofmt -l .) + if [ -n "$unformatted" ]; then + echo "Not gofmt'd:" + echo "$unformatted" + exit 1 + fi + + - name: Test + run: make test + + - name: Build + run: make build From c4ce8e66b611d66d9617752b114587b422b354d5 Mon Sep 17 00:00:00 2001 From: Robin Dittmar Date: Wed, 9 Sep 2026 17:13:17 +0200 Subject: [PATCH 2/2] fix: removed unused packages from 'Install system dependencies' step --- .gitea/workflows/pr-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-checks.yml b/.gitea/workflows/pr-checks.yml index 68915e3..41fbf5d 100644 --- a/.gitea/workflows/pr-checks.yml +++ b/.gitea/workflows/pr-checks.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Install system dependencies run: | - apt-get update && apt-get install -y --no-install-recommends git openssh-client curl + apt-get update && apt-get install -y --no-install-recommends curl curl -fsSL https://deb.nodesource.com/setup_24.x | bash - apt-get install -y nodejs