mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 10:11:56 +01:00
🚧 Testing with Docker Image
This commit is contained in:
parent
097db297a6
commit
d577c6975e
@ -1,4 +1,3 @@
|
|||||||
src
|
|
||||||
test
|
test
|
||||||
images
|
images
|
||||||
docs
|
docs
|
||||||
|
71
.github/workflows/docker.yml
vendored
71
.github/workflows/docker.yml
vendored
@ -10,7 +10,7 @@ on:
|
|||||||
- '.github/**'
|
- '.github/**'
|
||||||
- 'images/'
|
- 'images/'
|
||||||
- '*.md'
|
- '*.md'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@ -22,48 +22,37 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
strategy:
|
||||||
packages: write
|
matrix:
|
||||||
contents: read
|
include:
|
||||||
|
- arch: amd64
|
||||||
|
distro: ubuntu-latest
|
||||||
|
- arch: arm32v7
|
||||||
|
distro: ubuntu-latest
|
||||||
|
- arch: arm64v8
|
||||||
|
distro: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
- name: Setup
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v1
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- run: yarn install --immutable
|
|
||||||
|
|
||||||
- run: yarn build
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
with:
|
||||||
# list of Docker images to use as base name for tags
|
node-version: 16.17.1
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
- name: Install dependencies
|
||||||
|
run: yarn install
|
||||||
- name: Set up QEMU
|
- name: Build project
|
||||||
uses: docker/setup-qemu-action@v2
|
run: yarn build
|
||||||
|
- name: Build Docker image
|
||||||
- name: Set up Docker Buildx
|
run: | # .${platform}
|
||||||
uses: docker/setup-buildx-action@v2
|
docker build -t ghcr.io/${{ github.repository_owner }}/jellyfin-discord-music-bot:${GITHUB_SHA}-${{ matrix.arch }} -f Dockerfile .
|
||||||
|
docker tag ghcr.io/${{ github.repository_owner }}/jellyfin-discord-music-bot:${GITHUB_SHA}-${{ matrix.arch }} ghcr.io/${{ github.repository_owner }}/jellyfin-discord-music-bot:latest
|
||||||
- name: Login to GHCR
|
- name: Log in to GHCR
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Push Docker image
|
||||||
- name: Build and push Docker image
|
run: |
|
||||||
uses: docker/build-push-action@v3
|
docker push ghcr.io/${{ github.repository_owner }}/jellyfin-discord-music-bot:${GITHUB_SHA}-${{ matrix.arch }}
|
||||||
with:
|
docker push ghcr.io/${{ github.repository_owner }}/jellyfin-discord-music-bot:latest
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
@ -3,6 +3,10 @@ RUN apk add ffmpeg
|
|||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN yarn install --production
|
RUN yarn install --immutable
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
CMD yarn start:prod
|
RUN ls -lha
|
||||||
|
RUN ls dist -lha
|
||||||
|
|
||||||
|
CMD ["yarn", "start:prod"]
|
Loading…
Reference in New Issue
Block a user