forked from Fijxu/anubis-patches
init
This commit is contained in:
commit
7f10294cb3
6 changed files with 115 additions and 0 deletions
97
.github/workflows/docker.yml
vendored
Normal file
97
.github/workflows/docker.yml
vendored
Normal file
|
@ -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
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "anubis"]
|
||||||
|
path = anubis
|
||||||
|
url = https://github.com/TecharoHQ/anubis
|
1
anubis
Submodule
1
anubis
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 52ca5390c2b54374e62cbcd2efaf78edaa4e7249
|
4
apply-patches.sh
Executable file
4
apply-patches.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd ./anubis || exit
|
||||||
|
git am ../patches/*.patch -3
|
6
format-patches.sh
Executable file
6
format-patches.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Removing old patches"
|
||||||
|
rm ./patches/*.patch
|
||||||
|
cd ./anubis || exit
|
||||||
|
git format-patch origin/HEAD --output-directory ../patches
|
4
reset-repo.sh
Executable file
4
reset-repo.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd ./anubis || exit
|
||||||
|
git reset --hard origin/HEAD
|
Loading…
Add table
Reference in a new issue