mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-09 22:31:14 +03:00
Compare commits
4 Commits
angular-up
...
further-do
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67d4c8a5ce | ||
|
|
fe187ed55b | ||
|
|
945e784950 | ||
|
|
b153799531 |
42
.github/workflows/docker-pr.yml
vendored
Normal file
42
.github/workflows/docker-pr.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: docker-pr
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set hash
|
||||||
|
id: vars
|
||||||
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||||
|
- name: create-json
|
||||||
|
id: create-json
|
||||||
|
uses: jsdaniell/create-json@1.1.2
|
||||||
|
with:
|
||||||
|
name: "version.json"
|
||||||
|
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
|
||||||
|
dir: 'backend/'
|
||||||
|
- name: setup platform emulator
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
- name: setup multi-arch docker build
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: build & push images
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm,linux/arm64/v8
|
||||||
|
push: false
|
||||||
|
tags: tzahi12345/youtubedl-material:nightly-pr
|
||||||
24
Dockerfile
24
Dockerfile
@@ -8,18 +8,12 @@ RUN sh ./docker-build.sh
|
|||||||
FROM ubuntu:20.04 as frontend
|
FROM ubuntu:20.04 as frontend
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update && apt-get -y install \
|
RUN apt-get update && apt-get -y install curl
|
||||||
wget \
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||||
curl \
|
RUN apt-get -y install nodejs \
|
||||||
gnupg && \
|
yarn
|
||||||
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
|
RUN npm config set strict-ssl false
|
||||||
apt-get -y install \
|
RUN npm install -g @angular/cli
|
||||||
nodejs \
|
|
||||||
# YARN: brings along npm, solves dependency conflicts,
|
|
||||||
# spares us this spaghetti approach: https://stackoverflow.com/a/60547197
|
|
||||||
yarn && \
|
|
||||||
apt-get install -f && \
|
|
||||||
npm install -g @angular/cli
|
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY [ "package.json", "package-lock.json", "/build/" ]
|
COPY [ "package.json", "package-lock.json", "/build/" ]
|
||||||
@@ -44,16 +38,18 @@ RUN groupadd -g $GID $USER && useradd --system -g $USER --uid $UID $USER
|
|||||||
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||||
RUN apt-get update && apt-get -y install \
|
RUN apt-get update && apt-get -y install \
|
||||||
npm \
|
nodejs \
|
||||||
|
yarn \
|
||||||
python2 \
|
python2 \
|
||||||
python3 \
|
python3 \
|
||||||
atomicparsley && \
|
atomicparsley && \
|
||||||
apt-get install -f && \
|
|
||||||
apt-get autoremove --purge && \
|
apt-get autoremove --purge && \
|
||||||
apt-get autoremove && \
|
apt-get autoremove && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt
|
rm -rf /var/lib/apt
|
||||||
|
|
||||||
|
RUN npm config set strict-ssl false
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
|
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
|
||||||
COPY --from=ffmpeg /usr/local/bin/ffprobe /usr/local/bin/ffprobe
|
COPY --from=ffmpeg /usr/local/bin/ffprobe /usr/local/bin/ffprobe
|
||||||
|
|||||||
Reference in New Issue
Block a user