Skip to content

Messing around with node-gyp #77

Messing around with node-gyp

Messing around with node-gyp #77

Workflow file for this run

name: CI
on:
push:
branches:
- 'debug'
tags:
- '*'
pull_request:
branches:
- 'main'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 https://github.com/actions/checkout/releases/tag/v4.1.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 https://github.com/actions/setup-node/releases/tag/v3.8.2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- run: npm run example
docker: # Should run after the npm package was published
# if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- # Needed for buildX, which accessed cwd
name: Checkout
uses: actions/checkout@v3
- run: npm install
-
name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 https://github.com/docker/setup-qemu-action/releases/tag/v3.0.0
- # See note on build-push-action github repo on why this needed
name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 https://github.com/docker/setup-buildx-action/releases/tag/v3.0.0
-
name: Login to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 https://github.com/docker/login-action/releases/tag/v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 https://github.com/docker/build-push-action/releases/tag/v5.1.0
with:
context: . # TODO: verify if needed (uses context of cwd instead of that of a fresh git checkout)
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rehoster:debug