Skip to content

Commit

Permalink
chore: upgrade deps and CI (#12)
Browse files Browse the repository at this point in the history
* chore: upgrade deps and CI

* feat: upgrade dep

* chore: prepare release

* chore: prepare release
  • Loading branch information
Tchoupinax authored May 17, 2024
1 parent 5c0c466 commit 217a0d9
Show file tree
Hide file tree
Showing 8 changed files with 1,163 additions and 1,172 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/build-image-latest.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
name: build-image-latest

on:
push:
branches:
- master

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
tags: tchoupinax/s3-prometheus-exporter:latest
name: build-image-latest

on:
push:
branches:
- master

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d-%Hh%M')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: tchoupinax/s3-prometheus-exporter:latest,tchoupinax/s3-prometheus-exporter:latest-${{ steps.date.outputs.date }}
59 changes: 29 additions & 30 deletions .github/workflows/build-image-next.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
name: build-image-latest

on:
push:
branches:
- feature/**

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
tags: tchoupinax/s3-prometheus-exporter:next
name: build-image-latest

on:
push:
branches:
- feature/**

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d-%Hh%M')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: tchoupinax/s3-prometheus-exporter:next,tchoupinax/s3-prometheus-exporter:next-${{ steps.date.outputs.date }}
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Unit tests

on:
push:
branches:
- feature/**

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['21.x']

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21
22
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:21-alpine as builder
FROM node:22-alpine as builder

WORKDIR /app

Expand All @@ -12,7 +12,7 @@ RUN yarn build

###

FROM node:21-alpine
FROM node:22-alpine

WORKDIR /app

Expand Down
10 changes: 5 additions & 5 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"accessKey": "minio",
"bucket": "minio",
"endpoint": "https://s3.fr-par.scw.cloud",
"logger": {
"level": "debug",
"pretty": true
},
"port": 6004,
"prefixes": "default",
"region": "fr-par",
"secretKey": "minio",
"region": "fr-par"
"logger": {
"level": "debug",
"pretty": true
}
}
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "s3-prometheus-exporter",
"version": "0.4.0",
"version": "0.4.1",
"description": "S3 data exporter for prometheus",
"author": "Tchoupinax <[email protected]> (https://corentinfiloche.xyz)",
"license": "MIT",
Expand All @@ -21,25 +21,25 @@
"watch": "nodemon --exec vite-node --options.deps.inline=\"@aws-sdk\" src/index.ts"
},
"dependencies": {
"@aws-sdk/client-s3": "3.478.0",
"config": "3.3.9",
"express": "4.18.2",
"fastify": "4.25.2",
"moment": "2.29.4",
"pino": "8.17.1",
"pino-pretty": "10.3.0",
"@aws-sdk/client-s3": "3.577.0",
"config": "3.3.11",
"express": "4.19.2",
"fastify": "4.27.0",
"moment": "2.30.1",
"pino": "9.1.0",
"pino-pretty": "11.0.0",
"pretty-bytes": "6.1.1",
"prom-client": "15.1.0",
"vite-node": "1.1.0",
"vitest": "1.1.0"
"prom-client": "15.1.2",
"vite-node": "1.6.0",
"vitest": "1.6.0"
},
"devDependencies": {
"@types/config": "3.3.3",
"@types/config": "3.3.4",
"@types/express": "4.17.21",
"@types/node": "20.10.5",
"@types/node": "20.12.12",
"esbuild-plugin-tsc": "0.4.0",
"eslint-config-tchoupinax": "1.0.3",
"nodemon": "3.0.2",
"nodemon": "3.1.0",
"typescript": "5"
}
}
Loading

0 comments on commit 217a0d9

Please sign in to comment.