Skip to content

Commit

Permalink
Added github workflow (on release publish -> push to dockerhub)
Browse files Browse the repository at this point in the history
removed useless dev dependency
cleanup of gitignore
added TODO list
  • Loading branch information
Pierre Awaragi committed Mar 20, 2022
1 parent 1bfaea0 commit 79adac1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Publish
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Print tag number
run: echo Publishing to tag ${{ github.event.release.tag_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push (release tag)
uses: docker/build-push-action@v2
with:
push: true
tags: awaragi/prometheus-mssql-exporter:${{ github.event.release.tag_name }}
- name: Build and push (latest)
uses: docker/build-push-action@v2
with:
push: true
tags: awaragi/poc-hub-docker:latest
- name: Update repo description
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: awaragi/prometheus-mssql-exporter
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/node_modules/
node_modules
*.iml
/.idea/
.idea
.vscode
.env
package-lock.json
yarn.lock
yarn-error.log
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM node:16.14.2-alpine
MAINTAINER Pierre Awaragi ([email protected])
LABEL MAINTAINER="Pierre Awaragi ([email protected]), cobolbaby"
LABEL org.opencontainers.image.authors="Pierre Awaragi ([email protected]), cobolbaby"

# Create a directory where our app will be placed
RUN mkdir -p /usr/src/app
Expand All @@ -8,7 +9,7 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Copy dependency definitions
COPY package.json *.js /usr/src/app/
COPY package.json *.js ./

# Install dependecies
RUN npm install --production
Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

- sql version (see https://www.mssqltips.com/sqlservertip/1140/how-to-tell-what-sql-server-version-you-are-running/ and summary metric)
- https://github.com/rongfengliang/prometheus-mssql-exporter/commit/0fc70b747cf2bd8f2e96c58a2cb6f1fc4aae39dd
- custom metrics? https://github.com/awaragi/prometheus-mssql-exporter/pull/17
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
},
"devDependencies": {
"jest": "27.5.1",
"nodemon": "1.11.0",
"prettier": "2.6.0",
"superagent": "^7.1.1"
"superagent": "7.1.1"
}
}

0 comments on commit 79adac1

Please sign in to comment.