diff --git a/.woodpecker/Dockerfile b/.woodpecker/Dockerfile new file mode 100644 index 00000000..cd2086d0 --- /dev/null +++ b/.woodpecker/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.12 +RUN apt update && apt -y upgrade && apt -y --no-install-recommends install libopenal-dev libsdl2-dev libvorbis-dev cmake clang-format rsync +RUN pip install --upgrade pip +COPY ../config/requirements.txt ballistica_requirements.txt +RUN pip install -r ballistica_requirements.txt diff --git a/.woodpecker/ballistica_dev_image.yaml b/.woodpecker/ballistica_dev_image.yaml new file mode 100644 index 00000000..527aebcb --- /dev/null +++ b/.woodpecker/ballistica_dev_image.yaml @@ -0,0 +1,14 @@ +when: + - event: manual + +steps: + - name: buildx + image: woodpeckerci/plugin-docker-buildx + settings: + dockerfile: .woodpecker/Dockerfile + registry: codeberg.org + repo: ${CI_REPO}-dev + tag: latest + username: ${CI_REPO_OWNER} + password: + from_secret: ACCESS_TOKEN diff --git a/.woodpecker/cd.yaml b/.woodpecker/release.yaml similarity index 76% rename from .woodpecker/cd.yaml rename to .woodpecker/release.yaml index 88d22689..47c0499a 100644 --- a/.woodpecker/cd.yaml +++ b/.woodpecker/release.yaml @@ -1,9 +1,10 @@ when: - event: tag + ref: refs/tags/v* steps: - name: build - image: 3ra0/ballistica:dev + image: codeberg.org/3ra/ballistica-dev:latest pull: true commands: - make prefab-linux-x86-64-gui-debug-build @@ -16,7 +17,5 @@ steps: from_secret: ACCESS_TOKEN files: - 'ballisticakit_linux_x86_64.tar.xz' - prerelease: true - note: 'These are automated debug prefab builds; use them for testing purposes only.' - title: 'auto pre-release' + title: ${CI_COMMIT_TAG} depends_on: [build] diff --git a/.woodpecker/trigger.yaml b/.woodpecker/trigger.yaml deleted file mode 100644 index 8d77112f..00000000 --- a/.woodpecker/trigger.yaml +++ /dev/null @@ -1,18 +0,0 @@ -when: - - event: push - -skip_clone: true - -steps: - - name: tag - image: alpine/curl - environment: - ACCESS_TOKEN: - from_secret: ACCESS_TOKEN - commands: - - >- - curl -s -o /dev/null -X "DELETE" "https://codeberg.org/api/v1/repos/$CI_REPO/releases/tags/auto.latest" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" - - >- - curl -s -o /dev/null -X "DELETE" "https://codeberg.org/api/v1/repos/$CI_REPO/tags/auto.latest" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" - - >- - if [ $(curl -s -o /dev/null -w "%{http_code}" -X "POST" "https://codeberg.org/api/v1/repos/$CI_REPO/tags" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" -H "Content-Type: application/json" -d "{\"message\": \"AUTO TRIGGER TAG\", \"tag_name\": \"auto.latest\", \"target\": \"$CI_COMMIT_SHA\"}") != "201" ]; then exit 1; fi