Skip to content

Commit

Permalink
Merge branch 'main' into docker-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvehed authored Dec 8, 2024
2 parents 6027485 + e994f2d commit 3e69c4c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
npm-debug.log
.git
Dockerfile
docker-compose.yml
*.env
build-version.json
35 changes: 35 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Docker

on:
push:
tags:
- 'v*'

jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
packages: write
contents: read

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker Image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/yourip-app:latest .
docker tag ghcr.io/${{ github.repository_owner }}/yourip-app:latest ghcr.io/${{ github.repository_owner }}/yourip-app:${{ github.ref_name }}
- name: Push Docker Image
run: |
docker push ghcr.io/${{ github.repository_owner }}/yourip-app:latest
docker push ghcr.io/${{ github.repository_owner }}/yourip-app:${{ github.ref_name }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ WORKDIR /app
# Copy package.json and package-lock.json (or yarn.lock)
COPY package*.json ./


# Copy pre-generated build-version.json
COPY build-version.json ./

Expand Down

0 comments on commit 3e69c4c

Please sign in to comment.