Skip to content

Commit

Permalink
Add gitea / forgejo support (#28)
Browse files Browse the repository at this point in the history
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent 242e1c9 commit 81d223b
Show file tree
Hide file tree
Showing 12 changed files with 826 additions and 384 deletions.
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
"endOfLine": "lf"
}
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ WORKDIR /app

ENV NODE_ENV=production

COPY ["package.json", "pnpm-lock.yaml", "./"]
COPY ["tsconfig.json", "./"]
COPY ["src", "./src"]

RUN apt update \
&& apt install -y git git-lfs wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN corepack enable

COPY ["package.json", "pnpm-lock.yaml", "./"]
RUN pnpm install --frozen-lockfile

COPY ["tsconfig.json", "./"]
COPY ["src", "./src"]

CMD ["/app/node_modules/.bin/tsx", "/app/src/run.ts"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ export default {
- [x] Support first release (no previous tags)
- [x] Support defining next version manually (can be done by changing the version on the release pull-request title / commit message)
- [ ] Support more forges:
- [ ] Gitea
- [x] Github
- [x] Gitea
- [x] Forgejo _(via gitea api client)_
- [ ] Gitlab
- [ ] Bitbucket

## Credits

Expand Down
4 changes: 3 additions & 1 deletion docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ There are two parts to configure the plugin:
| Settings | Default | Description |
| ---------------------------- | ---------------------- | ------------------------------------------------- |
| `GITHUB_TOKEN` | _none_ | The GitHub token to use for the GitHub API |
| `FORGE_TYPE` | CI_FORGE_TYPE | The forge type we connect to (github, gitea, ...) |
| `FORGE_URL` | CI_FORGE_URL | The url of the forge |
| `FORGE_TOKEN` | _none_ | The token to connect to the forge |
| `GIT_EMAIL` | _none_ | The email to use for git commits |
| `RELEASE_BRANCH` | CI_REPO_DEFAULT_BRANCH | The branch used to merge the changelog to |
| `PULL_REQUEST_BRANCH_PREFIX` | `next-release/` | The prefix used for release pull-request branches |
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dependencies": {
"@octokit/rest": "^21.0.0",
"execa": "^9.0.0",
"gitea-js": "^1.22.0",
"picocolors": "^1.0.0",
"semver": "^7.5.3",
"shelljs": "^0.8.5",
Expand Down
Loading

0 comments on commit 81d223b

Please sign in to comment.