diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index dc9b877..4cd12d5 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -20,6 +20,7 @@ on: - "Dockerfile-scribe" - "Dockerfile-quetre" - "Dockerfile-breezewiki" + - "Dockerfile-nitter" - "remote-check.sh" # Automated schedule: @@ -59,6 +60,11 @@ jobs: id: breezewiki run: sh remote-check.sh https://gitdab.com/cadence/breezewiki breezewiki-local.txt build-hashes/breezewiki.txt breezewiki-out-of-date + - name: Pull Nitter guest_accounts remote commits + if: ${{ github.event.inputs.trigger_all_builds == 'false' || github.event.inputs.trigger_all_builds == '' }} + id: nitter + run: sh remote-check.sh https://github.com/zedeus/nitter nitter-local.txt build-hashes/nitter.txt nitter-out-of-date guest_accounts + # build-quetre: # needs: check-for-updates # if: ${{ needs.check-for-updates.outputs.quetre == 'true' }} @@ -124,3 +130,26 @@ jobs: # This is used to complete the identity challenge # with sigstore/fulcio when running outside of PRs. id-token: write + + build-nitter: + needs: check-for-updates + if: ${{ needs.check-for-updates.outputs.nitter == 'true' }} + uses: FarisZR/Privacy-OCI/.github/workflows/build-workflow.yml@main + secrets: inherit + with: + image_name: fariszr/nitter + dockerfile: Dockerfile-nitter + context: ./nitter + license: AGPL-3.0 + clone_repo: ${{ true }} + hash_file: build-hashes/nitter.txt + app_name: nitter + branch: guest_accounts + repo: https://github.com/zedeus/nitter + build_arch: linux/amd64, linux/arm64 + permissions: + contents: write + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write \ No newline at end of file diff --git a/Dockerfile-nitter b/Dockerfile-nitter new file mode 100644 index 0000000..065328a --- /dev/null +++ b/Dockerfile-nitter @@ -0,0 +1,24 @@ +FROM alpine:3.18 as nim + +RUN apk --no-cache add libsass-dev pcre gcc git libc-dev "nim=1.6.14-r0" "nimble=0.13.1-r2" + +WORKDIR /src/nitter + +COPY nitter.nimble . +RUN nimble install -y --depsOnly + +COPY . . +RUN nimble build -d:danger -d:lto -d:strip \ + && nimble scss \ + && nimble md + +FROM alpine:3.18 +WORKDIR /src/ +RUN apk --no-cache add pcre ca-certificates openssl1.1-compat +COPY --from=nim /src/nitter/nitter ./ +COPY --from=nim /src/nitter/nitter.example.conf ./nitter.conf +COPY --from=nim /src/nitter/public ./public +EXPOSE 8080 +RUN adduser -h /src/ -D -s /bin/sh nitter +USER nitter +CMD ./nitter \ No newline at end of file diff --git a/build-hashes/nitter.txt b/build-hashes/nitter.txt new file mode 100644 index 0000000..e69de29