feat: fix tiktok, fix bluesky, added runner to build arm64 with QEMU

This commit is contained in:
Nevo David 2025-04-11 22:03:12 +07:00
parent 9b59dbd746
commit 2a9934bd8c
6 changed files with 341 additions and 2868 deletions

View File

@ -16,11 +16,11 @@ jobs:
- name: Get Container Version
id: getcontainerver
run: |
echo "containerver=$(date +'%s')" >> "$GITHUB_OUTPUT"
echo "containerver=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
build-containers:
needs: build-containers-common
strategy:
strategy:
matrix:
include:
- runnertags: ubuntu-latest
@ -37,6 +37,13 @@ jobs:
submodules: 'true'
token: ${{ secrets.PAT_TOKEN }}
- name: Set up QEMU (For ARM64 Builds)
if: matrix.arch == 'arm64'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr
uses: docker/login-action@v3
with:
@ -44,25 +51,15 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}
- name: docker build
run: ./var/docker/docker-build.sh
- name: Print post-build debug info
run: |
docker images
- name: docker tag
env:
- name: Build and Push Image
env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: |
docker tag localhost/postiz ghcr.io/gitroomhq/postiz-app-enterprise:${{ matrix.arch }}-${{ env.CONTAINERVER }}
docker push ghcr.io/gitroomhq/postiz-app-enterprise:${{ matrix.arch }}-${{ env.CONTAINERVER }}
docker tag localhost/postiz-devcontainer ghcr.io/gitroomhq/postiz-devcontainer-enterprise:${{ env.CONTAINERVER }}
docker push ghcr.io/gitroomhq/postiz-devcontainer-enterprise:${{ env.CONTAINERVER }}
docker tag ghcr.io/gitroomhq/postiz-devcontainer-enterprise:${{ env.CONTAINERVER }} ghcr.io/gitroomhq/postiz-devcontainer-enterprise:latest
docker push ghcr.io/gitroomhq/postiz-devcontainer-enterprise:latest
docker buildx build --platform linux/${{ matrix.arch }} \
-f Dockerfile.dev \
-t ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-${{ matrix.arch }} \
--provenance=false --sbom=false \
--output "type=registry,name=ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-${{ matrix.arch }}" .
build-container-manifest:
needs: [build-containers, build-containers-common]
@ -75,13 +72,35 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Create Docker Manifest
env:
- name: Create Docker Manifest
env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: |
docker manifest create \
ghcr.io/gitroomhq/postiz-app-enterprise:latest \
ghcr.io/gitroomhq/postiz-app-enterprise:amd64-${{ env.CONTAINERVER }} \
ghcr.io/gitroomhq/postiz-app-enterprise:arm64-${{ env.CONTAINERVER }}
# Verify the architecture images
echo "Verifying AMD64 image:"
docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64
echo "Verifying ARM64 image:"
docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-arm64
# Try to remove any existing manifests first
docker manifest rm ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }} || true
docker manifest rm ghcr.io/gitroomhq/postiz-app-enterprise:latest || true
# Create and push the version-specific manifest
docker manifest create ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }} \
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64 \
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-arm64
docker manifest push ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}
# Create and push the latest manifest
docker manifest create ghcr.io/gitroomhq/postiz-app-enterprise:latest \
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64 \
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-arm64
docker manifest push ghcr.io/gitroomhq/postiz-app-enterprise:latest
- name: Verify Manifest
run: |
docker manifest inspect ghcr.io/gitroomhq/postiz-app-enterprise:latest

View File

@ -35,6 +35,13 @@ jobs:
with:
fetch-depth: 0
- name: Set up QEMU (For ARM64 Builds)
if: matrix.arch == 'arm64'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr
uses: docker/login-action@v3
with:
@ -42,22 +49,15 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}
- name: docker build
run: ./var/docker/docker-build.sh
- name: Print post-build debug info
run: |
docker images
- name: docker tag
- name: Build and Push Image
env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: |
docker tag localhost/postiz ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }}
docker push ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }}
docker tag localhost/postiz-devcontainer ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-${{ matrix.arch }}
docker push ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-${{ matrix.arch }}
docker buildx build --platform linux/${{ matrix.arch }} \
-f Dockerfile.dev \
-t ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }} \
--provenance=false --sbom=false \
--output "type=registry,name=ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }}" .
build-container-manifest:
needs: [build-containers, build-containers-common]
@ -74,16 +74,31 @@ jobs:
env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: |
docker manifest create \
ghcr.io/gitroomhq/postiz-app:latest \
ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-arm64 \
ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-amd64
# Verify the architecture images
echo "Verifying AMD64 image:"
docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-amd64
echo "Verifying ARM64 image:"
docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-arm64
# Try to remove any existing manifests first
docker manifest rm ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }} || true
docker manifest rm ghcr.io/gitroomhq/postiz-app:latest || true
# Create and push the version-specific manifest
docker manifest create ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }} \
--amend ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-amd64 \
--amend ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-arm64
docker manifest push ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}
# Create and push the latest manifest
docker manifest create ghcr.io/gitroomhq/postiz-app:latest \
--amend ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-amd64 \
--amend ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-arm64
docker manifest push ghcr.io/gitroomhq/postiz-app:latest
docker manifest create \
ghcr.io/gitroomhq/postiz-devcontainer:latest \
ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-arm64 \
ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-amd64
docker manifest push ghcr.io/gitroomhq/postiz-devcontainer:latest
- name: Verify Manifest
run: |
docker manifest inspect ghcr.io/gitroomhq/postiz-app:latest

View File

@ -326,5 +326,5 @@ export default withProvider(
return true;
},
2200
90
);

View File

@ -191,6 +191,7 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
embed: {
$type: 'app.bsky.embed.images',
images: images.map((p) => ({
alt: 'picture',
// can be an array up to 4 values
// alt: 'image', // the alt text - commented this out for now until there is a way to set this from within Postiz
image: p.data.blob,

3072
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@
},
"private": true,
"dependencies": {
"@atproto/api": "^0.13.11",
"@atproto/api": "^0.14.21",
"@aws-sdk/client-s3": "3.712.0",
"@aws-sdk/s3-request-presigner": "3.712.0",
"@casl/ability": "^6.5.0",
@ -169,7 +169,7 @@
"simple-statistics": "^7.8.3",
"stripe": "^15.5.0",
"striptags": "^3.2.0",
"sweetalert2": "^11.6.13",
"sweetalert2": "^11.17.2",
"swr": "^2.2.5",
"tailwind-scrollbar": "^3.1.0",
"tailwindcss": "3.4.3",