diff --git a/.drone.yml b/.drone.yml index c999a3f..56d07fc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,49 +1,44 @@ +--- kind: pipeline type: docker -name: default +name: Build (amd64) +platform: + arch: amd64 steps: - - name: dependencies + - name: Get Dependencies image: node commands: - yarn --check-cache - - name: lint + - name: Lint image: node depends_on: - - dependencies + - Get Dependencies commands: - yarn lint:ci - - name: build + - name: Build image: node depends_on: - - dependencies + - Lint commands: - yarn build - - name: test + - name: Package image: node depends_on: - - build - commands: - - yarn test - - - name: package - image: node - depends_on: - - lint - - test + - Lint commands: - yarn package when: event: - tag - - name: Release + - name: Make Gitea Release image: plugins/gitea-release depends_on: - - package + - Package settings: api_key: from_secret: release_api_key @@ -53,3 +48,54 @@ steps: when: event: - tag +--- +kind: pipeline +type: docker +name: Build (arm64) +platform: + arch: arm64 + +steps: + - name: Get Dependencies + image: node + commands: + - yarn --check-cache + + - name: Lint + image: node + depends_on: + - Get Dependencies + commands: + - yarn lint:ci + + - name: Build + image: node + depends_on: + - Lint + commands: + - yarn build + + - name: Package + image: node + depends_on: + - Lint + commands: + - yarn package + when: + event: + - tag + + - name: Make Gitea Release + image: plugins/gitea-release + depends_on: + - Package + settings: + api_key: + from_secret: release_api_key + base_url: https://git.froth.zone + files: + - dist/imagebot-* + when: + event: + - tag + diff --git a/README.md b/README.md index 742b777..d1649e2 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,30 @@ A bot that posts local and booru images to the Fediverse. Compatible with Mastodon, Misskey and Pleroma! ## MIGRATING MAJOR VERSIONS -See [MIGRATING.md](./MIGRATING.md) -## Boorus supported +See [the wiki](https://git.froth.zone/Sam/fediverse-imagebot/wiki/Migrating). + +## Boorus supported + The full list of boorus supported is found [here](https://github.com/AtoraSuunva/booru/blob/master/src/sites.json). -## Downloading pre-built binaries +## Downloading the bot -Download prebuilt binaries from [here](https://git.froth.zone/Sam/fediverse-imagebot/releases/latest) (currently only supports x64), or build from source, instructions below. +There are currently two ways to do this, either with a pre-built binary or building from source. Both are listed below. -## Running from Source +### Downloading pre-built binaries + +Download prebuilt binaries from [here](https://git.froth.zone/Sam/fediverse-imagebot/releases/latest). (currently only supports x86_64) + +1. Run the bot with the `-w` flag to have it generate a configuration file to the local directory. + +2. Edit it for your use case. + +- If you want to generate a key you can use https://git.froth.zone/Sam/js-feditoken + +3. Run the bot by launching the executable! + +### Running from Source 1. You need to have `npm` and `nodejs` installed. @@ -39,21 +53,14 @@ Download prebuilt binaries from [here](https://git.froth.zone/Sam/fediverse-imag 6. Edit the config file: \ `cp config.sample.jsonc config.jsonc` + - If you want to generate a key you can use https://git.froth.zone/Sam/js-feditoken -6. Run the bot: \ +7. Run the bot: \ `yarn bot` You're done! The bot should post a local image to the fediverse instance of your choosing! -## Running the bot - -1. Obtain a token. I have another tool that does this for you, which can be found [here](https://git.froth.zone/Sam/js-feditoken) and put it in `config.jsonc`, following the sample jsonc file. - -2. Put images in the `images` folder. - -- By default the bot will look for SFW images at `images/sfw` and NSFW images at `images/nsfw`. This can be configured with the `directory` config setting. - ## Automating the bot _TODO: Elaborate more_