Skip to content

Commit

Permalink
add node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
danwulff committed Sep 13, 2024
1 parent 9e31dcd commit 3f7d475
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [14.x, 16.x, 18.x]
mongodb-version: [4.4, 5.0, 6.0]

steps:
Expand All @@ -40,51 +40,51 @@ jobs:
- name: Send Coverage
run: npm run-script coverage

publish:
name: Publish to Docker Hub
needs: test
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.repository_owner == 'nightscout'
env:
DOCKER_IMAGE: nightscout/cgm-remote-monitor
PLATFORMS: linux/amd64,linux/arm64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v3
- name: Build, tag and push the dev Docker image
if: success() && github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v2
with:
context: .
push: true
no-cache: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }}
${{ env.DOCKER_IMAGE }}:latest_dev
# publish:
# name: Publish to Docker Hub
# needs: test
# runs-on: ubuntu-latest
# if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.repository_owner == 'nightscout'
# env:
# DOCKER_IMAGE: nightscout/cgm-remote-monitor
# PLATFORMS: linux/amd64,linux/arm64
# steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USER }}
# password: ${{ secrets.DOCKER_PASS }}
# - name: Clean git Checkout
# if: success()
# uses: actions/checkout@v3
# - name: Build, tag and push the dev Docker image
# if: success() && github.ref == 'refs/heads/dev'
# uses: docker/build-push-action@v2
# with:
# context: .
# push: true
# no-cache: true
# platforms: ${{ env.PLATFORMS }}
# tags: |
# ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }}
# ${{ env.DOCKER_IMAGE }}:latest_dev

- name: Get Nightscout release version
if: success() && github.ref == 'refs/heads/master'
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Build, tag and push the master Docker image
if: success() && github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
push: true
no-cache: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
${{ env.DOCKER_IMAGE }}:latest
# - name: Get Nightscout release version
# if: success() && github.ref == 'refs/heads/master'
# id: package-version
# uses: martinbeentjes/npm-get-version-action@master
# - name: Build, tag and push the master Docker image
# if: success() && github.ref == 'refs/heads/master'
# uses: docker/build-push-action@v2
# with:
# context: .
# push: true
# no-cache: true
# platforms: ${{ env.PLATFORMS }}
# tags: |
# ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
# ${{ env.DOCKER_IMAGE }}:latest

0 comments on commit 3f7d475

Please sign in to comment.