mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-10-18 19:35:04 +02:00
🚀 Add deployments for armv7 and multi-architecture
This commit is contained in:
parent
d577c6975e
commit
ac60caf975
@ -1,7 +1,6 @@
|
|||||||
test
|
test
|
||||||
images
|
images
|
||||||
docs
|
docs
|
||||||
node_modules
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
Dockerfile
|
Dockerfile
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
70
.github/workflows/docker.yml
vendored
70
.github/workflows/docker.yml
vendored
@ -22,37 +22,53 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
permissions:
|
||||||
matrix:
|
packages: write
|
||||||
include:
|
contents: read
|
||||||
- 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
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
node-version: 16.17.1
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
- name: Install dependencies
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
run: yarn install
|
restore-keys: |
|
||||||
- name: Build project
|
${{ runner.os }}-yarn-
|
||||||
run: yarn build
|
- run: yarn install --immutable
|
||||||
- name: Build Docker image
|
- run: yarn build
|
||||||
run: | # .${platform}
|
- name: Docker meta
|
||||||
docker build -t ghcr.io/${{ github.repository_owner }}/jellyfin-discord-music-bot:${GITHUB_SHA}-${{ matrix.arch }} -f Dockerfile .
|
id: meta
|
||||||
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
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
# list of Docker images to use as base name for tags
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
# generate Docker tags based on the following events/attributes
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=pep440,pattern={{version}}
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
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
|
||||||
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
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
FROM node:16.17.1-alpine
|
FROM node:16.13.1-alpine3.12
|
||||||
RUN apk add ffmpeg
|
RUN apk add ffmpeg
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN yarn install --immutable
|
|
||||||
RUN yarn build
|
EXPOSE 3000
|
||||||
|
|
||||||
RUN ls -lha
|
RUN ls -lha
|
||||||
RUN ls dist -lha
|
RUN ls dist -lha
|
||||||
|
Loading…
Reference in New Issue
Block a user