forked from Vakaris-U/ignition-git-module
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed .modl from gitignore, added base gh action yml
- Loading branch information
Showing
2 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# use IntelliJ or Eclipse as an IDE | ||
|
||
# Ignition Module files | ||
*.modl | ||
#*.modl | ||
|
||
# Java class files | ||
*.class | ||
|