Skip to content

Commit

Permalink
Small change to dockerignore. Added github actions file
Browse files Browse the repository at this point in the history
  • Loading branch information
onel committed Jan 10, 2024
1 parent 2bd32ea commit f6ae35c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.git
node_modules/
.github
# TODO: we need custom build for web to make this work. can't use docker compose
# DOCKER_BUILDKIT=1
# docker build -f ./web/Dockerfile.dev ./web/ -t peermetrics/web:dev
# node_modules/
__pycache__/
40 changes: 40 additions & 0 deletions .github/workflows/docker-hub-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docker Hub

env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
REPO_NAME: ${{ secrets.REPO_NAME }}

on:
push:
branches:
- 'master'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
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: $DOCKERHUB_USERNAME
password: $DOCKERHUB_TOKEN

-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: peermetrics/web:latest

- name: Logout from Docker Hub
run: docker logout
1 change: 1 addition & 0 deletions .dev.dockerignore → Dockerfile.dev.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.git
.github
__pycache__/
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6ae35c

Please sign in to comment.