Skip to content

Commit

Permalink
Smaller updates (#42)
Browse files Browse the repository at this point in the history
* Update dependabot.yml
* Update docker-image.yml
  Also push images on `push` event to container registry
* Update Dockerfile
  Remove grouping - didn't work
  • Loading branch information
svengo authored Sep 20, 2023
1 parent d5c82c4 commit f3a1220
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
time: "09:00"
timezone: "Europe/Berlin"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
with:
images: ${{ vars.IMAGE_NAMESPACE }}/${{ vars.IMAGE_NAME }}
flavor: |
latest=${{ github.event.release.prerelease == false }}
latest=${{ github.event_name == 'release' && github.event.release.prerelease == false }}
tags: |
type=match,pattern=v(.*),group=1
type=sha
Expand All @@ -51,9 +51,8 @@ jobs:
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name == 'release' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=docker-tor-image
cache-to: type=gha,mode=max,scope=docker-tor-image
cache-from: type=gha
cache-to: type=gha,mode=max

18 changes: 1 addition & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ARG TZ=Europe/Berlin
WORKDIR /tmp

RUN \
echo "::group::Install required packages" && \
set -o xtrace && \
apk update && \
apk add \
Expand All @@ -30,9 +29,7 @@ RUN \
xz-dev \
zlib-dev \
zstd-dev && \
echo "::endgroup::" && \
\
echo "::group::Download Tor" && \
CURL_OPTIONS="--no-progress-meter --fail --location --remote-name" && \
curl ${CURL_OPTIONS} "https://dist.torproject.org/tor-${TOR_VERSION}.tar.gz" && \
curl ${CURL_OPTIONS} "https://dist.torproject.org/tor-${TOR_VERSION}.tar.gz.sha256sum" && \
Expand All @@ -43,9 +40,7 @@ RUN \
sha256sum -c "tor-${TOR_VERSION}.tar.gz.sha256sum" && \
gpg --verify "tor-${TOR_VERSION}.tar.gz.sha256sum.asc" && \
tar -zxf "tor-${TOR_VERSION}.tar.gz" && \
echo "::endgroup::" && \
\
echo "::group::Configure" && \
cd tor-${TOR_VERSION} && \
./configure \
--sysconfdir=/etc \
Expand All @@ -58,30 +53,19 @@ RUN \
--enable-lzma \
--enable-zstd \
--silent && \
echo "::endgroup::" && \
\
echo "::group::Build" && \
CFLAGS=-Wno-cpp make && \
echo "::endgroup::" && \
\
echo "::group::Test" && \
make test && \
echo "::endgroup::" && \
\
echo "::group::Install" && \
make install && \
echo "::endgroup::" && \
\
echo "::group::Cleanup" && \
apk del build && \
rm -rf /tmp/* && \
rm -rf /var/cache/apk/* && \
echo "::endgroup::" && \
\
echo "::group::Add tor user and group" && \
addgroup -S tor && \
adduser -s /bin/false -SDH -G tor tor && \
echo "::endgroup::"
adduser -s /bin/false -SDH -G tor tor

VOLUME /data
WORKDIR /data
Expand Down

0 comments on commit f3a1220

Please sign in to comment.