Skip to content

Commit

Permalink
Another temporary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xMikux committed Sep 1, 2022
1 parent deca4a8 commit e58ec02
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/docker-build_temp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Muse Docker Image (Temp)

on:
workflow_dispatch: {}
push:
branches:
- temp_fix

jobs:
Docker:
runs-on: ubuntu-latest

steps:
- name: Checking Repostiory
uses: actions/checkout@v3
with:
ref: temp_fix

- name: Setup multiarch
uses: docker/setup-qemu-action@v2

- name: Set up Buildx
uses: docker/setup-buildx-action@v2

- name: Login ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}

- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time

- name: Build and push
uses: docker/build-push-action@v3
with:
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/xmikux/muse:fix
build-args: |
COMMIT_HASH=${{ github.sha }}
BUILD_DATE=${{ steps.current-time.outputs.time }}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ WORKDIR /usr/app
COPY package.json .
COPY yarn.lock .

RUN yarn install --prod
RUN yarn install --prod && \
sed -i "64s/const subBody = body.slice(ndx + functionStart.length);/const end = body.indexOf('.join(\"\")};', ndx);/" node_modules/ytdl-core/lib/sig.js && \
sed -i "65s/const functionBody = \`var \${functionStart}\${utils.cutAfterJS(subBody)};\${functionName}(ncode);\`;/const subBody = body.slice(ndx, end); const functionBody = \`\${subBody}.join(\"\")};\${functionName}(ncode);\`;/" node_modules/ytdl-core/lib/sig.js

# Only keep what's necessary to run
FROM base AS runner
Expand Down

0 comments on commit e58ec02

Please sign in to comment.