Skip to content

Commit

Permalink
added docker ci for autobuilding the image
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiancolosimo committed May 9, 2023
1 parent 3127121 commit 41f9256
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

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

- name: Build and push Docker images
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ COPY src ./src
RUN mkdir db
RUN deno cache index.ts
CMD ["deno","run", "--allow-net", "--allow-read", "--allow-env", "--allow-write","index.ts"]

0 comments on commit 41f9256

Please sign in to comment.