Attempt workflow

This commit is contained in:
Anton Liaposhchenko 2024-05-24 21:04:32 +03:00
parent 1d891a2335
commit 7f3003c8bd
3 changed files with 53 additions and 1 deletions

40
.github/workflows/docker-image.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Publish Docker image
on:
push:
branches: [main]
jobs:
push_to_registry:
name: Push Docker image to the registry
runs-on: ubuntu-22.04
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build and push Docker image (aarch64)
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
id: build-aarch64
- name: Extract file (aarch64)
run: ID=$(docker create ${{ steps.build-aarch64.outputs.imageid }}) docker cp $ID:/opt/app/target/release/libbliss_js.so index-aarch64-unknown-linux-gnu.node; docker rm $ID
- name: Build and push Docker image (x86_64)
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
id: build-x86_64
- name: Extract file (x86_64)
run: ID=$(docker create ${{ steps.build-x86_64.outputs.imageid }}) docker cp $ID:/opt/app/target/release/libbliss_js.so index-x86_64-unknown-linux-gnu.node; docker rm $ID
- name: Log in to NPM
run: |
npm config set @bliss-rs:registry https://gitea.antonlyap.pp.ua/api/packages/antonlyap/npm/ && \
echo //gitea.antonlyap.pp.ua/api/packages/antonlyap/npm/:_authToken=${{ secrets.NPM_TOKEN }} > ~/.npmrc
- run: npm publish

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM gitea.antonlyap.pp.ua/antonlyap/ffmpeg-min:6.1 as ffmpeg
FROM rust:1-bookworm
COPY --from=ffmpeg /opt/ffmpeg-build/ /usr/
RUN apt-get update
RUN apt-get install libclang-dev
COPY . /opt/app
WORKDIR /opt/app
RUN cargo build --release

View File

@ -1,6 +1,6 @@
{ {
"name": "@bliss-rs/bliss-rs", "name": "@bliss-rs/bliss-rs",
"version": "0.0.4", "version": "0.0.5",
"description": "A fork of the bliss-rs library with Node.js bindings", "description": "A fork of the bliss-rs library with Node.js bindings",
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",