-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Nightly | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # Every day at midnight | ||
push: | ||
paths: | ||
- ".github/workflows/nightly.yml" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
publish: | ||
name: Nightly | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: 📦 Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🧪 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: 🔒 Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 🏗️ Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
# This is a template to be used by GoReleaser. | ||
# See docs for details: https://goreleaser.com/customization/docker/ | ||
FROM golang:1.20 as builder | ||
|
||
FROM alpine:3.16 | ||
WORKDIR /app | ||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN make build | ||
|
||
# Download youtube-dl | ||
RUN wget -O /usr/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \ | ||
chmod +x /usr/bin/yt-dlp && \ | ||
ln -s /usr/bin/yt-dlp /usr/bin/youtube-dl && \ | ||
apk --no-cache add ca-certificates python3 py3-pip ffmpeg tzdata | ||
COPY podsync /app/podsync | ||
chmod +x /usr/bin/yt-dlp | ||
|
||
FROM alpine:3.17 | ||
|
||
WORKDIR /app | ||
|
||
RUN apk --no-cache add ca-certificates python3 py3-pip ffmpeg tzdata \ | ||
# https://github.com/golang/go/issues/59305 | ||
libc6-compat && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 | ||
|
||
COPY --from=builder /usr/bin/yt-dlp /usr/bin/youtube-dl | ||
COPY --from=builder /build/bin/podsync /app/podsync | ||
|
||
ENTRYPOINT ["/app/podsync"] | ||
CMD ["--no-banner"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters