Move to Github Registry Containers #165
@@ -1,7 +1,25 @@
|
||||
name: Test - The Bds Maneger Core
|
||||
on: [pull_request]
|
||||
name: Docker And Node Test
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
CodeQL:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "javascript"
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
Test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -26,8 +44,16 @@ jobs:
|
||||
- name: Run test
|
||||
run: npm run ci
|
||||
|
||||
Test_Docker:
|
||||
Docker-Multiarch:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm/v7
|
||||
|
||||
name: "Build And Test Docker Image, Arch: ${{ matrix.arch }}"
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@@ -39,8 +65,12 @@ jobs:
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Build Docker Image
|
||||
id: DockerArch
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
target: bdscore
|
||||
tags: coretest:latest
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
|
||||
- name: "Run Docker Image, digiest: ${{ outputs.DockerArch.digest }}"
|
||||
run: docker run --rm -it -e DebugArch="true" coretest:latest@{{ outputs.DockerArch.digest }}
|
||||
44
.github/workflows/codeql and ossar analysis.yml
vendored
44
.github/workflows/codeql and ossar analysis.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: "CodeQL and OSSAR"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "38 17 * * */3"
|
||||
- cron: '36 21 * * 2'
|
||||
|
||||
jobs:
|
||||
OSSAR-Scan:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Run OSSAR
|
||||
uses: github/ossar-action@v1
|
||||
id: ossar
|
||||
- name: Upload OSSAR results
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ "javascript" ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
34
.github/workflows/main.yml
vendored
34
.github/workflows/main.yml
vendored
@@ -8,6 +8,21 @@ env:
|
||||
DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
jobs:
|
||||
CodeQL:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "javascript"
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
npm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -21,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Edit Version
|
||||
env:
|
||||
RunID: ${{ github.run_id }}
|
||||
RunID: ${{ github.run_id }}
|
||||
run: node .github/ChangeVersion.js
|
||||
|
||||
- name: Install Packages
|
||||
@@ -45,8 +60,10 @@ jobs:
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_ORG_USER }}
|
||||
password: ${{ secrets.DOCKER_ORG_PASS }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@master
|
||||
@@ -57,7 +74,7 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
target: bdscore
|
||||
tags: bdsmaneger/core:main
|
||||
tags: ghcr.io/the-bds-maneger/core:main
|
||||
platforms: ${{ env.DOCKER_ARCH }}
|
||||
|
||||
docker_base:
|
||||
@@ -73,8 +90,9 @@ jobs:
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_ORG_USER }}
|
||||
password: ${{ secrets.DOCKER_ORG_PASS }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@master
|
||||
@@ -85,7 +103,5 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
target: bdsbase
|
||||
tags: |
|
||||
bdsmaneger/base:main
|
||||
bdsmaneger/node_image:main
|
||||
tags: ghcr.io/the-bds-maneger/base:main
|
||||
platforms: ${{ env.DOCKER_ARCH }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Npm Packages Stable and Docker Image
|
||||
name: Publish Releases
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
@@ -44,8 +44,9 @@ jobs:
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_ORG_USER }}
|
||||
password: ${{ secrets.DOCKER_ORG_PASS }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@master
|
||||
@@ -56,7 +57,7 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
target: bdscore
|
||||
tags: bdsmaneger/core:latest
|
||||
tags: ghcr.io/the-bds-maneger/core:latest
|
||||
platforms: ${{ env.DOCKER_ARCH }}
|
||||
|
||||
docker_base:
|
||||
@@ -85,8 +86,5 @@ jobs:
|
||||
push: true
|
||||
target: bdsbase
|
||||
tags: |
|
||||
bdsmaneger/base:latest
|
||||
bdsmaneger/base:${{ github.run_id }}
|
||||
bdsmaneger/node_image:latest
|
||||
bdsmaneger/node_image:${{ github.run_id }}
|
||||
ghcr.io/the-bds-maneger/base:latest
|
||||
platforms: ${{ env.DOCKER_ARCH }}
|
||||
@@ -54,6 +54,14 @@ function StartServer(){
|
||||
}
|
||||
});
|
||||
}
|
||||
// Debug Arch
|
||||
if (process.env.DebugArch === "true") {
|
||||
console.log("Debug Arch:", process.arch);
|
||||
setTimeout(() => {
|
||||
console.log("Stop Server end debug");
|
||||
process.exit(0);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
// Check Installed Server
|
||||
|
||||
Reference in New Issue
Block a user