-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added github workflow (on release publish -> push to dockerhub)
removed useless dev dependency cleanup of gitignore added TODO list
- Loading branch information
Pierre Awaragi
committed
Mar 20, 2022
1 parent
1bfaea0
commit 79adac1
Showing
5 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters