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,7 +16,7 @@ jobs:
- name: Get Container Version - name: Get Container Version
id: getcontainerver id: getcontainerver
run: | run: |
echo "containerver=$(date +'%s')" >> "$GITHUB_OUTPUT" echo "containerver=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
build-containers: build-containers:
needs: build-containers-common needs: build-containers-common
@ -37,6 +37,13 @@ jobs:
submodules: 'true' submodules: 'true'
token: ${{ secrets.PAT_TOKEN }} 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 - name: Login to ghcr
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -44,25 +51,15 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ github.token }} password: ${{ github.token }}
- name: docker build - name: Build and Push Image
run: ./var/docker/docker-build.sh
- name: Print post-build debug info
run: |
docker images
- name: docker tag
env: env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }} CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: | run: |
docker tag localhost/postiz ghcr.io/gitroomhq/postiz-app-enterprise:${{ matrix.arch }}-${{ env.CONTAINERVER }} docker buildx build --platform linux/${{ matrix.arch }} \
docker push ghcr.io/gitroomhq/postiz-app-enterprise:${{ matrix.arch }}-${{ env.CONTAINERVER }} -f Dockerfile.dev \
-t ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-${{ matrix.arch }} \
docker tag localhost/postiz-devcontainer ghcr.io/gitroomhq/postiz-devcontainer-enterprise:${{ env.CONTAINERVER }} --provenance=false --sbom=false \
docker push ghcr.io/gitroomhq/postiz-devcontainer-enterprise:${{ env.CONTAINERVER }} --output "type=registry,name=ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-${{ matrix.arch }}" .
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
build-container-manifest: build-container-manifest:
needs: [build-containers, build-containers-common] needs: [build-containers, build-containers-common]
@ -79,9 +76,31 @@ jobs:
env: env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }} CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: | run: |
docker manifest create \ # Verify the architecture images
ghcr.io/gitroomhq/postiz-app-enterprise:latest \ echo "Verifying AMD64 image:"
ghcr.io/gitroomhq/postiz-app-enterprise:amd64-${{ env.CONTAINERVER }} \ docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64
ghcr.io/gitroomhq/postiz-app-enterprise:arm64-${{ env.CONTAINERVER }}
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 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: with:
fetch-depth: 0 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 - name: Login to ghcr
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -42,22 +49,15 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ github.token }} password: ${{ github.token }}
- name: docker build - name: Build and Push Image
run: ./var/docker/docker-build.sh
- name: Print post-build debug info
run: |
docker images
- name: docker tag
env: env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }} CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: | run: |
docker tag localhost/postiz ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }} docker buildx build --platform linux/${{ matrix.arch }} \
docker push ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }} -f Dockerfile.dev \
-t ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }} \
docker tag localhost/postiz-devcontainer ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-${{ matrix.arch }} --provenance=false --sbom=false \
docker push ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-${{ matrix.arch }} --output "type=registry,name=ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-${{ matrix.arch }}" .
build-container-manifest: build-container-manifest:
needs: [build-containers, build-containers-common] needs: [build-containers, build-containers-common]
@ -74,16 +74,31 @@ jobs:
env: env:
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }} CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
run: | run: |
docker manifest create \ # Verify the architecture images
ghcr.io/gitroomhq/postiz-app:latest \ echo "Verifying AMD64 image:"
ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-arm64 \ docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app:${{ env.CONTAINERVER }}-amd64
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 push ghcr.io/gitroomhq/postiz-app:latest
docker manifest create \ - name: Verify Manifest
ghcr.io/gitroomhq/postiz-devcontainer:latest \ run: |
ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-arm64 \ docker manifest inspect ghcr.io/gitroomhq/postiz-app:latest
ghcr.io/gitroomhq/postiz-devcontainer:${{ env.CONTAINERVER }}-amd64
docker manifest push ghcr.io/gitroomhq/postiz-devcontainer:latest

View File

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

View File

@ -191,6 +191,7 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
embed: { embed: {
$type: 'app.bsky.embed.images', $type: 'app.bsky.embed.images',
images: images.map((p) => ({ images: images.map((p) => ({
alt: 'picture',
// can be an array up to 4 values // 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 // 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, 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, "private": true,
"dependencies": { "dependencies": {
"@atproto/api": "^0.13.11", "@atproto/api": "^0.14.21",
"@aws-sdk/client-s3": "3.712.0", "@aws-sdk/client-s3": "3.712.0",
"@aws-sdk/s3-request-presigner": "3.712.0", "@aws-sdk/s3-request-presigner": "3.712.0",
"@casl/ability": "^6.5.0", "@casl/ability": "^6.5.0",
@ -169,7 +169,7 @@
"simple-statistics": "^7.8.3", "simple-statistics": "^7.8.3",
"stripe": "^15.5.0", "stripe": "^15.5.0",
"striptags": "^3.2.0", "striptags": "^3.2.0",
"sweetalert2": "^11.6.13", "sweetalert2": "^11.17.2",
"swr": "^2.2.5", "swr": "^2.2.5",
"tailwind-scrollbar": "^3.1.0", "tailwind-scrollbar": "^3.1.0",
"tailwindcss": "3.4.3", "tailwindcss": "3.4.3",