Browse Source

setup github action verifying docker build succeeds

Fabian Peter Hammerle 2 years ago
parent
commit
15b23da469
2 changed files with 27 additions and 1 deletions
  1. 26 0
      .github/workflows/container-image.yml
  2. 1 1
      Dockerfile

+ 26 - 0
.github/workflows/container-image.yml

@@ -0,0 +1,26 @@
+# sync with https://github.com/fphammerle/docker-onion-service/blob/master/.github/workflows/container-image.yml
+
+name: container image
+
+on:
+  push:
+  pull_request:
+  schedule:
+  - cron: '0 20 * * 5'
+
+jobs:
+  docker-build:
+    runs-on: ubuntu-20.04
+    steps:
+    - uses: docker/setup-qemu-action@v1.2.0
+    - uses: docker/setup-buildx-action@v1.6.0
+    # > By default, this action uses the Git context so you don't need to use
+    # > the actions/checkout action to checkout the repository because this
+    # > will be done directly by buildkit. [...]
+    # > any file mutation in the steps that precede [...] will be ignored
+    # https://github.com/marketplace/actions/build-and-push-docker-images
+    - uses: docker/build-push-action@v2.8.0
+      with:
+        platforms: |
+          linux/amd64
+          linux/arm/v7

+ 1 - 1
Dockerfile

@@ -26,7 +26,7 @@ RUN apk add --no-cache \
     && adduser -S build
 
 USER build
-RUN pip3 install --user --no-cache-dir pipenv==2020.6.2
+RUN pip3 install --user --no-cache-dir pipenv==2021.5.29
 
 ARG SOURCE_DIR_PATH
 COPY --chown=build:nobody Pipfile Pipfile.lock $SOURCE_DIR_PATH/