initial commit
This commit is contained in:
parent
04c3258c9e
commit
651bf8c286
8
.editorconfig
Normal file
8
.editorconfig
Normal file
@ -0,0 +1,8 @@
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
|
||||
[*.{js,jsx,ts,tsx,py,sh,md,gql,graphql,yaml,yml,json,sql,njk,scss,css}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
0
.github/README.md
vendored
Normal file
0
.github/README.md
vendored
Normal file
50
.github/workflows/container-push.yml
vendored
Normal file
50
.github/workflows/container-push.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
name: Reusable container push workflow
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
REPO: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
container-push:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- id: get-id
|
||||
name: Get a unique tag for this build
|
||||
run: |
|
||||
SHA=${{ github.sha }}; BRANCH_NAME=${{ github.base_ref || github.ref_name }};
|
||||
BUILD_ID=$BRANCH_NAME-${SHA:0:8};
|
||||
DOCKER_IMAGE=${{ vars.docker_repo2_registry }}/$REPO:$BUILD_ID;
|
||||
echo "BUILD_ID=$BUILD_ID" >> "$GITHUB_OUTPUT";
|
||||
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> "$GITHUB_OUTPUT";
|
||||
|
||||
- name: Print build id and image name
|
||||
run: |
|
||||
echo "BUILD_ID: ${{ steps.get-id.outputs.BUILD_ID }}";
|
||||
echo "DOCKER_IMAGE: ${{ steps.get-id.outputs.DOCKER_IMAGE }}";
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to docker container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.docker_repo2_registry }}
|
||||
username: ${{ vars.docker_repo2_username }}
|
||||
password: ${{ vars.docker_repo2_password }}
|
||||
|
||||
- name: Build the container image
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg PUBLIC_BUILD_VERSION=${{ steps.get-id.outputs.BUILD_ID }} \
|
||||
--file fab/d/actions-build.Dockerfile \
|
||||
--tag ${{ steps.get-id.outputs.DOCKER_IMAGE }} \
|
||||
.;
|
||||
|
||||
- name: Container details
|
||||
run: |
|
||||
IMAGE_SIZE=`docker inspect -f "{{ .Size }}" ${{ steps.get-id.outputs.DOCKER_IMAGE }} | numfmt --to=si`;
|
||||
echo "$IMAGE_SIZE container ${{ steps.get-id.outputs.DOCKER_IMAGE }}";
|
||||
|
||||
- name: Push the container image
|
||||
run: docker push ${{ steps.get-id.outputs.DOCKER_IMAGE }}
|
||||
28
.github/workflows/lint-and-check.yml
vendored
Normal file
28
.github/workflows/lint-and-check.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: NPM Link and check resuable workflow
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
REPO: ${{ github.repository }}/temp #Add /temp for PR workflow
|
||||
|
||||
jobs:
|
||||
|
||||
lint-and-check:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
registry-url: ${{ vars.NPM_REGISTRY }}
|
||||
token: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: |
|
||||
npm install -g pnpm
|
||||
pnpm install
|
||||
|
||||
- run: pnpm lint
|
||||
- run: pnpm check
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 GMetri XR
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Loading…
x
Reference in New Issue
Block a user