Skip to content

Commit

Permalink
Merge pull request #1 from packetcode/dev
Browse files Browse the repository at this point in the history
Create buildAndPublish.yml
  • Loading branch information
kamaltejag authored Feb 1, 2024
2 parents 343d687 + b0c59f3 commit add26f3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/buildAndPublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build And Publish to Docker Hub

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present

- uses: mr-smithers-excellent/docker-build-push@v6
with:
image: packetcodeofficial/github-actions
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:stable

COPY ./dist/github-actions /usr/share/nginx/html

0 comments on commit add26f3

Please sign in to comment.