summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlimiting-factor <limiting-factor@posteo.com>2024-08-07 15:04:05 +0200
committerEarl Warren <contact@earl-warren.org>2024-08-19 09:44:04 +0200
commitb6efebc2374d0911760764aab6e8a290dcd4a0a1 (patch)
treefcba2517c0cce45e8f0266b07506b71f9da622b4
parentMerge pull request 'Update dependency @stylistic/stylelint-plugin to v3.0.1 (... (diff)
downloadforgejo-b6efebc2374d0911760764aab6e8a290dcd4a0a1.tar.xz
forgejo-b6efebc2374d0911760764aab6e8a290dcd4a0a1.zip
feat: add forgejo-cli to the container images
When the Forgejo CLI binary is `forgejo-cli`, the `--verbose` or `--quiet` arguments are available globally for all sub-commands. The same sub-commands can be used with `forgejo forgejo-cli`, those flags are not available.
-rw-r--r--.forgejo/testdata/build-release/Dockerfile2
-rw-r--r--.forgejo/workflows/build-release.yml2
-rw-r--r--Dockerfile1
-rw-r--r--Dockerfile.rootless1
4 files changed, 4 insertions, 2 deletions
diff --git a/.forgejo/testdata/build-release/Dockerfile b/.forgejo/testdata/build-release/Dockerfile
index 4ef67d34e0..9c44dedddd 100644
--- a/.forgejo/testdata/build-release/Dockerfile
+++ b/.forgejo/testdata/build-release/Dockerfile
@@ -3,4 +3,4 @@ ARG RELEASE_VERSION=unkown
LABEL maintainer="contact@forgejo.org" \
org.opencontainers.image.version="${RELEASE_VERSION}"
RUN mkdir -p /app/gitea
-RUN ( echo '#!/bin/sh' ; echo "echo forgejo v$RELEASE_VERSION" ) > /app/gitea/gitea ; chmod +x /app/gitea/gitea
+RUN ( echo '#!/bin/sh' ; echo "echo forgejo v$RELEASE_VERSION" ) > /app/gitea/forgejo-cli ; chmod +x /app/gitea/forgejo-cli
diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml
index 3e5c4ea6b2..097a7e7480 100644
--- a/.forgejo/workflows/build-release.yml
+++ b/.forgejo/workflows/build-release.yml
@@ -170,7 +170,7 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v6
release-notes: "${{ steps.release-notes.outputs.value }}"
binary-name: forgejo
- binary-path: /app/gitea/gitea
+ binary-path: /app/gitea/forgejo-cli
override: "${{ steps.release-info.outputs.override }}"
verify-labels: "maintainer=contact@forgejo.org,org.opencontainers.image.version=${{ steps.release-info.outputs.version }}"
verbose: ${{ vars.VERBOSE || secrets.VERBOSE || 'false' }}
diff --git a/Dockerfile b/Dockerfile
index eba2fb97d3..736a2c694c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -103,5 +103,6 @@ CMD ["/bin/s6-svscan", "/etc/s6"]
COPY --from=build-env /tmp/local /
RUN cd /usr/local/bin ; ln -s gitea forgejo
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
+RUN ln /app/gitea/gitea /app/gitea/forgejo-cli
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh
diff --git a/Dockerfile.rootless b/Dockerfile.rootless
index e255328052..9567b32af6 100644
--- a/Dockerfile.rootless
+++ b/Dockerfile.rootless
@@ -90,6 +90,7 @@ RUN chown git:git /var/lib/gitea /etc/gitea
COPY --from=build-env /tmp/local /
RUN cd /usr/local/bin ; ln -s gitea forgejo
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
+RUN ln /app/gitea/gitea /app/gitea/forgejo-cli
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh