Skip to content

Commit 35e64b2

Browse files
authored
build yt-dlp lavalink image (#272)
1 parent c1c03d8 commit 35e64b2

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

.github/workflows/docker.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build Image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ '**' ]
7+
paths:
8+
- 'docker/**'
9+
- '.github/workflows/docker.yml'
10+
11+
jobs:
12+
check-upstream:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- name: Latest Ubuntu
19+
tag: latest
20+
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
21+
dockerfile: docker/Dockerfile
22+
- name: Latest Alpine
23+
tag: latest-alpine
24+
platforms: linux/amd64,linux/arm64/v8
25+
dockerfile: docker/alpine.Dockerfile
26+
- name: Dev Ubuntu
27+
tag: dev
28+
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
29+
dockerfile: docker/Dockerfile
30+
- name: Dev Alpine
31+
tag: dev-alpine
32+
platforms: linux/amd64,linux/arm64/v8
33+
dockerfile: docker/alpine.Dockerfile
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Set up QEMU
39+
uses: docker/setup-qemu-action@v3
40+
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v3
43+
44+
- name: Login to GitHub Container Registry
45+
uses: docker/login-action@v3
46+
with:
47+
registry: ghcr.io
48+
username: ${{ github.repository_owner }}
49+
password: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Log stuff
52+
run: |
53+
echo "Dockerfile: ${{ matrix.dockerfile }}"
54+
echo "Tag: ${{ matrix.tag }}"
55+
echo "Name: ${{ matrix.name }}"
56+
echo "Platforms: ${{ matrix.platforms }}"
57+
58+
- name: Docker Build ${{ matrix.name }} and Push
59+
uses: docker/build-push-action@v6
60+
with:
61+
file: ${{ matrix.dockerfile }}
62+
context: .
63+
platforms: ${{ matrix.platforms }}
64+
push: true
65+
tags: ghcr.io/topi314/lavasrc:${{ matrix.tag }}
66+
build-args: |
67+
TAG=${{ matrix.tag }}

.github/workflows/publish.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Publish
22
on:
33
push:
4+
branches: [ '**' ]
5+
paths-ignore:
6+
- '**.md'
7+
- 'docker/**'
8+
- '.github/workflows/docker.yml'
49
release:
510
types: [ published ]
611
jobs:

docker/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ARG TAG
2+
3+
FROM ghcr.io/lavalink-devs/lavalink:${TAG}
4+
5+
USER root
6+
7+
RUN apt-get update && \
8+
apt-get install -y python3 curl && \
9+
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/bin/yt-dlp && \
10+
chmod +x /usr/bin/yt-dlp
11+
12+
USER lavalink

docker/alpine.Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG TAG
2+
3+
FROM ghcr.io/lavalink-devs/lavalink:${TAG}
4+
5+
USER root
6+
7+
RUN apk add --no-cache python3 curl && \
8+
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/bin/yt-dlp && \
9+
chmod +x /usr/bin/yt-dlp
10+
11+
USER lavalink

0 commit comments

Comments
 (0)