diff --git a/Dockerfile b/Dockerfile index 38a923f..c743c86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,10 +17,26 @@ RUN dotnet publish ServiceUpdater.csproj \ FROM debian:bookworm-slim AS final WORKDIR /app -RUN apt-get update && apt-get install -y --no-install-recommends \ - docker.io \ +RUN apt update && apt install --yes --no-install-recommends \ + curl \ + ca-certificates \ + gnupg \ + unzip \ + dumb-init \ + && install -m 0755 -d /etc/apt/keyrings \ + && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \ + && chmod a+r /etc/apt/keyrings/docker.gpg \ + && echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null \ + && apt update \ + && apt --yes --no-install-recommends install \ + docker-ce-cli \ + docker-compose-plugin \ && rm -rf /var/lib/apt/lists/* COPY --from=build /app/publish/ServiceUpdater /app COPY --from=build /app/publish/appsettings.json /app RUN chmod +x /app/ServiceUpdater +ENV ASPNETCORE_URLS="http://0.0.0.0:5000" ENTRYPOINT ["/app/ServiceUpdater"] diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..f2b67c4 --- /dev/null +++ b/action.yml @@ -0,0 +1,16 @@ +name: "Call Service Updater" +description: "Triggers the internal updater service via HTTP" +author: "Leon Hoppe" + +inputs: + service: + description: "Name of the service to update" + required: true + +runs: + using: "composite" + steps: + - name: Call updater + shell: sh + run: | + curl -N "http://updater:5000/update/${{ inputs.service }}"