From d8358f1b12a81b0140d45da9060d6000764131be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20I=C3=9Fbr=C3=BCcker?= Date: Sat, 23 Aug 2025 07:41:34 +0200 Subject: [PATCH] Add preview build --- .github/workflows/build-preview.yaml | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/build-preview.yaml diff --git a/.github/workflows/build-preview.yaml b/.github/workflows/build-preview.yaml new file mode 100644 index 0000000..f587306 --- /dev/null +++ b/.github/workflows/build-preview.yaml @@ -0,0 +1,55 @@ +name: build-preview + +on: workflow_dispatch + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Read version from file + id: get_version + run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build latest + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/default.Dockerfile + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: | + ghcr.io/sissbruecker/linkding:preview + target: linkding + push: true + + - name: Build latest-alpine + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/alpine.Dockerfile + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: | + ghcr.io/sissbruecker/linkding:preview-alpine + target: linkding + push: true