bliss-js/.github/workflows/docker-image.yml
Anton 56e7931a48
Some checks failed
Publish Docker image / Push Docker image to the registry (push) Failing after 43m40s
Debug file extraction
2024-05-24 21:28:25 +03:00

41 lines
1.3 KiB
YAML

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 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 }}) bash -c 'echo $ID; docker cp $ID:/opt/app/target/release/libbliss_js.so index-aarch64-unknown-linux-gnu.node; docker rm $ID'
- name: Build 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 }}) bash -c 'echo $ID; 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