Github workflow for nightly image
authorPablo Zmdl <redacted>
Fri, 8 Nov 2024 11:26:23 +0000 (12:26 +0100)
committerPablo Zmdl <redacted>
Fri, 8 Nov 2024 11:26:23 +0000 (12:26 +0100)
.github/workflows/build-and-publish-nightly.yml [new file with mode: 0644]

diff --git a/.github/workflows/build-and-publish-nightly.yml b/.github/workflows/build-and-publish-nightly.yml
new file mode 100644 (file)
index 0000000..0ff4112
--- /dev/null
@@ -0,0 +1,46 @@
+name: Build & Publish nightly
+
+permissions:
+  contents: read
+
+on:
+  schedule:
+    # Rebuild automatically each night
+    - cron: "* 4 * * *"
+
+jobs:
+  build-and-testvariants:
+    name: Build image and run tests
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+      - name: Get docker hub username
+        id: creds
+        run: echo '::set-output name=username::${{ secrets.DOCKER_PULL_USERNAME }}'
+      - name: Login to Docker Hub
+        if: steps.creds.outputs.username != ''
+        uses: docker/login-action@v3
+        with:
+          username: ${{ secrets.DOCKER_PULL_USERNAME }}
+          password: ${{ secrets.DOCKER_PUSH_PASSWORD }}
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+        with:
+          buildkitd-flags: --debug
+
+      - name: Build and push nightly image"
+        uses: docker/build-push-action@v5
+        with:
+          platforms: "linux/arm64,linux/arm/v6,linux/arm/v7,linux/s390x,linux/ppc64le,linux/386,linux/amd64,"
+          push: true
+          tags: nightly
+          # does not work linux/arm/v5 AND linux/mips64le - composer does not support  mips64le or armv5 nor does the php image support them on the alpine variant
+
+      - name: Run tests
+        env:
+          ROUNDCUBEMAIL_TEST_IMAGE: roundcube/roundcubemail:nightly
+        run: docker compose -f ./tests/docker-compose.test-apache-postgres.yml up --exit-code-from=sut --abort-on-container-exit
git clone https://git.99rst.org/PROJECT