commit 7f10294cb3daea7803e3a1fa1225e8f8b9251d4a Author: Fijxu Date: Sat Mar 29 17:23:18 2025 -0300 init diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..a11e013 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,97 @@ +name: Docker image builds + +on: + workflow_dispatch: + push: + branches: ["master"] + +env: + DOCKER_METADATA_SET_OUTPUT_ENV: "true" + REGISTRY: git.nadeko.net + IMAGE_NAME: fijxu/anubis-modified + +permissions: + contents: read + packages: write + attestations: write + id-token: write + pull-requests: write + +jobs: + build: + runs-on: runner + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-tags: true + fetch-depth: 0 + submodules: "recursive" + + - name: Patch anubis + run: | + cd ./anubis + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + git am ../patches/*.patch + + - name: Set up Homebrew + uses: github.com/Homebrew/actions/setup-homebrew@master + + - name: Setup Homebrew cellar cache + uses: actions/cache@v4 + with: + path: | + /home/linuxbrew/.linuxbrew/Cellar + /home/linuxbrew/.linuxbrew/bin + /home/linuxbrew/.linuxbrew/etc + /home/linuxbrew/.linuxbrew/include + /home/linuxbrew/.linuxbrew/lib + /home/linuxbrew/.linuxbrew/opt + /home/linuxbrew/.linuxbrew/sbin + /home/linuxbrew/.linuxbrew/share + /home/linuxbrew/.linuxbrew/var + key: ${{ runner.os }}-go-homebrew-cellar-${{ hashFiles('go.sum') }} + restore-keys: | + ${{ runner.os }}-go-homebrew-cellar- + + - name: Install Brew dependencies + run: | + brew bundle + + - name: Log into registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} + type=sha,prefix={{branch}}- + + - name: Build and push + id: build + run: | + npm ci + npm run container + env: + DOCKER_REPO: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + SLOG_LEVEL: debug + + # I don't need this. + # - name: Generate artifact attestation + # uses: github.com/actions/attest-build-provenance@v2 + # with: + # subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # subject-digest: ${{ steps.build.outputs.digest }} + # push-to-registry: true diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..98a50bf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "anubis"] + path = anubis + url = https://github.com/TecharoHQ/anubis diff --git a/anubis b/anubis new file mode 160000 index 0000000..52ca539 --- /dev/null +++ b/anubis @@ -0,0 +1 @@ +Subproject commit 52ca5390c2b54374e62cbcd2efaf78edaa4e7249 diff --git a/apply-patches.sh b/apply-patches.sh new file mode 100755 index 0000000..28633b6 --- /dev/null +++ b/apply-patches.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd ./anubis || exit +git am ../patches/*.patch -3 diff --git a/format-patches.sh b/format-patches.sh new file mode 100755 index 0000000..2672e88 --- /dev/null +++ b/format-patches.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "Removing old patches" +rm ./patches/*.patch +cd ./anubis || exit +git format-patch origin/HEAD --output-directory ../patches diff --git a/reset-repo.sh b/reset-repo.sh new file mode 100755 index 0000000..8ccd9f3 --- /dev/null +++ b/reset-repo.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd ./anubis || exit +git reset --hard origin/HEAD