Skip to content

Commit

Permalink
removed .modl from gitignore, added base gh action yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pmannion2 committed Jan 17, 2024
1 parent 13467d1 commit 8796041
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 1 deletion.
83 changes: 83 additions & 0 deletions .github/workflows/ci-ignition-git-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: continuous integration - core-mes

concurrency:
group: core-mes
cancel-in-progress: true

on:
pull_request:
branches:
- main
push:
branches:
- main
# paths: ["./apps/core-mes"]
# workflow_dispatch: # uncomment me to have it manually trigger the gh action

env:
REGISTRY: ghcr.io

jobs:
continuous-integration:
name: continuous integration
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
issues: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v3

- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: install dependencies
run: npm install
working-directory: ./apps/core-mes

- name: build
run: npm run build
working-directory: ./apps/core-mes

- name: test
run: npm run test-coverage
working-directory: ./apps/core-mes

- name: Run tests
run: |
npx jest --coverage | tee ./coverage.txt && exit ${PIPESTATUS[0]}
working-directory: ./apps/core-mes


- name: docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/WHK01/whk-mes/core-mes
flavor: latest=true
tags: |
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=pr,prefix=pr-
type=ref,event=tag,prefix=tag-
type=raw,value=${{ github.run_id }},prefix=gh-
- name: login to image repostiory
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: build and push
uses: docker/build-push-action@v3
with:
context: ./apps/core-mes
file: ./apps/core-mes/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# use IntelliJ or Eclipse as an IDE

# Ignition Module files
*.modl
#*.modl

# Java class files
*.class
Expand Down

0 comments on commit 8796041

Please sign in to comment.