From 7e3da13e73f5e7ea06d7dc1595e3205e60134f71 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 04:12:15 +0200 Subject: [PATCH 1/9] Running analysis on every branch --- .github/workflows/analysis.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 46995c15..333672da 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -1,11 +1,5 @@ name: Analysis -on: - push: - branches: - - master - pull_request: - branches: - - master +on: [push, pull_request] jobs: build: From 251790bad2455c69781b7c1ed2d447c54c4214ac Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 18:24:38 +0200 Subject: [PATCH 2/9] Enabling builds on all branches --- .github/workflows/build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd47b7b8..a775659f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,11 @@ name: Build - -on: - push: - branches: - - master +on: [push, pull_request] jobs: build: name: "${{matrix.artifact}}'s Build" runs-on: ${{matrix.os}} + if: github.event_name == "push" || github.event.pull_request.head.repo.full_name != github.repository strategy: fail-fast: false matrix: @@ -77,6 +74,7 @@ jobs: name: Create debian, rpm & arch releases runs-on: ubuntu-latest needs: build + if: github.ref == "refs/heads/master" env: description: "A media browser" version: v0.0.1 #${{ github.ref }} From e30bdde98f255af1982fbe140bfabd1e85c2d11f Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 18:25:46 +0200 Subject: [PATCH 3/9] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a775659f..5969ea76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ jobs: build: name: "${{matrix.artifact}}'s Build" runs-on: ${{matrix.os}} - if: github.event_name == "push" || github.event.pull_request.head.repo.full_name != github.repository + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: fail-fast: false matrix: @@ -74,7 +74,7 @@ jobs: name: Create debian, rpm & arch releases runs-on: ubuntu-latest needs: build - if: github.ref == "refs/heads/master" + if: github.ref == 'refs/heads/master' env: description: "A media browser" version: v0.0.1 #${{ github.ref }} From 484ccecb7556bc6e62e617470d67bd9099a999e1 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 19:16:30 +0200 Subject: [PATCH 4/9] Fixing the release script --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3baaa751..d9d75f5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ jobs: release: runs-on: ubuntu-latest steps: + - name: Set commit environment + run: echo "COMMIT_SHA=$(git rev-list -n 1 ${{github.ref}}) >> $GITHUB_ENV - uses: actions/checkout@v2 - name: Wait for builds & tests to finish uses: lewagon/wait-on-check-action@v0.2 @@ -24,7 +26,7 @@ jobs: - name: Download artifacts uses: dawidd6/action-download-artifact@v2 with: - commit: ${{github.ref}} + commit: ${{env.COMMIT_SHA}} workflow: build.yml path: ./artifacts github_token: ${{secrets.GITHUB_TOKEN}} From 3bd1c0e99ebe17273d4e044f7b0e14de5c0e0c45 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 19:17:32 +0200 Subject: [PATCH 5/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9d75f5d..0452fed7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set commit environment - run: echo "COMMIT_SHA=$(git rev-list -n 1 ${{github.ref}}) >> $GITHUB_ENV + run: echo "COMMIT_SHA=$(git rev-list -n 1 ${{github.ref}})" >> $GITHUB_ENV - uses: actions/checkout@v2 - name: Wait for builds & tests to finish uses: lewagon/wait-on-check-action@v0.2 From 61656704b22e485fe43b3df4ebe205e52a63c673 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 19:19:55 +0200 Subject: [PATCH 6/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0452fed7..e62bb55a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,9 +10,9 @@ jobs: release: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - name: Set commit environment run: echo "COMMIT_SHA=$(git rev-list -n 1 ${{github.ref}})" >> $GITHUB_ENV - - uses: actions/checkout@v2 - name: Wait for builds & tests to finish uses: lewagon/wait-on-check-action@v0.2 with: From 3af620380c705c6db2677bd87936100722b718b9 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 20:40:10 +0200 Subject: [PATCH 7/9] Adding a docker CI --- .github/workflows/docker.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..3d061699 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,22 @@ +name: Docker + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + steps: + - uses: actions/checkout@v2 + - name: Checkout submodules + run: git submodule update --init --recursive + - name: Push to GitHub Packages + uses: docker/build-push-action@v2 + with: + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + registry: docker.pkg.github.com + repository: AnonymusRaccoon/Kyoo/kyoo + tag_with_sha: true + - name: Docker build + run: docker build . -t kyoo:$(date +%s) From 44cfee0baef01ce7b10873801220d6ef5adcb417 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 21:31:32 +0200 Subject: [PATCH 8/9] Fixing the Dockerfile --- Dockerfile | 5 +++-- Kyoo.WebApp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index df52760d..8764c7df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM gcc:latest as transcoder -RUN apt-get update && apt-get install -y cmake make +RUN apt-get update && apt-get install -y cmake make libavutil-dev libavcodec-dev libavformat-dev WORKDIR /transcoder -COPY transcoder . +COPY Kyoo.Transcoder . RUN cmake . && make -j FROM node:alpine as webapp @@ -15,6 +15,7 @@ COPY . . RUN dotnet publish -c Release -o /opt/kyoo '-p:SkipWebApp=true;SkipTranscoder=true' FROM mcr.microsoft.com/dotnet/aspnet:5.0 +RUN apt-get update && apt-get install -y libavutil-dev libavcodec-dev libavformat-dev EXPOSE 5000 COPY --from=builder /opt/kyoo /usr/lib/kyoo COPY --from=transcoder /transcoder/libtranscoder.so /usr/lib/kyoo diff --git a/Kyoo.WebApp b/Kyoo.WebApp index ddf3337a..da35a725 160000 --- a/Kyoo.WebApp +++ b/Kyoo.WebApp @@ -1 +1 @@ -Subproject commit ddf3337acb766ae9e0987044ae38130d94fe60ad +Subproject commit da35a725a3e47db0994a697595aec4a10a4886e3 From c172c90d66a164dca958a1caa358d030ad94553e Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 18 Apr 2021 21:36:22 +0200 Subject: [PATCH 9/9] Oups --- .github/workflows/docker.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3d061699..4a1be2ff 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,5 +18,3 @@ jobs: registry: docker.pkg.github.com repository: AnonymusRaccoon/Kyoo/kyoo tag_with_sha: true - - name: Docker build - run: docker build . -t kyoo:$(date +%s)