Skip to content

Commit

Permalink
Add Dockerfile and build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
matsbov committed Nov 8, 2023
1 parent 378e7bc commit 60b5d30
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
tags:
- '*'

jobs:

build:

runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is primarily for building the production image

FROM nginx
COPY src /usr/share/nginx/html
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is primarily for running locally

services:

web:
Expand Down

0 comments on commit 60b5d30

Please sign in to comment.