This commit is contained in:
parent
d7a632d51d
commit
f4be08cf74
2 changed files with 14 additions and 3 deletions
|
@ -52,5 +52,7 @@ jobs:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
build-args: |
|
build-args: |
|
||||||
"release=1"
|
"release=1"
|
||||||
|
|
|
@ -7,6 +7,7 @@ ARG release
|
||||||
WORKDIR /invidious
|
WORKDIR /invidious
|
||||||
COPY ./shard.yml ./shard.yml
|
COPY ./shard.yml ./shard.yml
|
||||||
COPY ./shard.lock ./shard.lock
|
COPY ./shard.lock ./shard.lock
|
||||||
|
|
||||||
RUN shards install --production
|
RUN shards install --production
|
||||||
|
|
||||||
COPY ./src/ ./src/
|
COPY ./src/ ./src/
|
||||||
|
@ -19,9 +20,17 @@ COPY ./scripts/ ./scripts/
|
||||||
COPY ./assets/ ./assets/
|
COPY ./assets/ ./assets/
|
||||||
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
||||||
|
|
||||||
RUN crystal spec --warnings all \
|
RUN crystal build ./scripts/minify-js.cr \
|
||||||
--link-flags "-lxml2 -llzma"
|
--release --mcpu=x86-64-v2 \
|
||||||
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
|
--static \
|
||||||
|
--link-flags "-lxml2 -llzma"; \
|
||||||
|
|
||||||
|
RUN crystal build ./scripts/fetch-player-dependencies.cr \
|
||||||
|
--release --mcpu=x86-64-v2 \
|
||||||
|
--static \
|
||||||
|
--link-flags "-lxml2 -llzma"; \
|
||||||
|
|
||||||
|
RUN if [[ "${release}" == 1 ]] ; then \
|
||||||
crystal build ./src/invidious.cr \
|
crystal build ./src/invidious.cr \
|
||||||
--release --mcpu=x86-64-v2 \
|
--release --mcpu=x86-64-v2 \
|
||||||
--static --warnings all \
|
--static --warnings all \
|
||||||
|
|
Loading…
Add table
Reference in a new issue