-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from cloud-pi-native/develop
Develop
- Loading branch information
Showing
76 changed files
with
5,080 additions
and
1,327 deletions.
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,29 @@ | ||
# code | ||
.vscode/* | ||
|
||
# modules | ||
node_modules | ||
**/node_modules | ||
|
||
# package | ||
package.json | ||
|
||
# doc | ||
README.md | ||
|
||
# github actions | ||
!.github | ||
|
||
# TODO : Fix later | ||
# socle/roles/harbor/templates/ca-cm.yaml | ||
# 8:1 error Parsing error: Plain value cannot start with directive indicator character % | ||
|
||
# socle/roles/keycloak/templates/console-frontend-redirectUris.yaml | ||
# 2:0 error Parsing error: Unexpected flow-map-start at node end | ||
|
||
# socle/roles/keycloak/templates/console-frontend-webOrigins.yaml | ||
# 2:0 error Parsing error: Unexpected flow-map-start at node end | ||
|
||
roles/harbor/templates/ca-cm.yaml | ||
roles/keycloak/templates/console-frontend-redirectUris.yaml | ||
roles/keycloak/templates/console-frontend-webOrigins.yaml |
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,15 @@ | ||
module.exports = { | ||
extends: [ | ||
"plugin:yml/standard", | ||
], | ||
rules: { | ||
"yml/no-empty-mapping-value": "off", | ||
"yml/plain-scalar": "off", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.yaml", "*.yml"], | ||
parser: "yaml-eslint-parser", | ||
}, | ||
], | ||
} |
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,35 @@ | ||
name: Clean cache | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clean cache for closed branch | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
REPO=${{ github.repository }} | ||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) | ||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,15 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
NAMESPACE: "${{ github.repository }}" | ||
PLATFORM: "linux/amd64,linux/arm64" | ||
|
||
jobs: | ||
release: | ||
uses: ./.github/workflows/release.yml |
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,35 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
branches: | ||
- "**" | ||
workflow_dispatch: | ||
|
||
env: | ||
NODE_VERSION: 18.17.1 | ||
PNPM_VERSION: "8" | ||
|
||
jobs: | ||
expose-vars: | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.pull_request.draft }} | ||
outputs: | ||
NODE_VERSION: ${{ env.NODE_VERSION }} | ||
PNPM_VERSION: ${{ env.PNPM_VERSION }} | ||
steps: | ||
- name: Exposing env vars | ||
run: echo "Exposing env vars" | ||
|
||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
needs: | ||
- expose-vars | ||
with: | ||
NODE_VERSION: ${{ needs.expose-vars.outputs.NODE_VERSION }} | ||
PNPM_VERSION: ${{ needs.expose-vars.outputs.PNPM_VERSION }} |
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,53 @@ | ||
name: Lint | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
NODE_VERSION: | ||
required: false | ||
type: string | ||
PNPM_VERSION: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
lint: | ||
name: Setup project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checks-out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "${{ inputs.NODE_VERSION }}" | ||
check-latest: true | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: "${{ inputs.PNPM_VERSION }}" | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ env.STORE_PATH }} | ||
/home/runner/.cache/Cypress | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Check lint error | ||
run: pnpm run lint |
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,40 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
release-created: | ||
description: Has the release been created | ||
value: ${{ jobs.release.outputs.release-created }} | ||
major-tag: | ||
description: Major version tag | ||
value: ${{ jobs.release.outputs.major-tag }} | ||
minor-tag: | ||
description: Minor version tag | ||
value: ${{ jobs.release.outputs.minor-tag }} | ||
patch-tag: | ||
description: Patch version tag | ||
value: ${{ jobs.release.outputs.patch-tag }} | ||
|
||
jobs: | ||
release: | ||
name: Create new release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release-created: ${{ steps.release.outputs.release_created }} | ||
major-tag: ${{ steps.release.outputs.major }} | ||
minor-tag: ${{ steps.release.outputs.minor }} | ||
patch-tag: ${{ steps.release.outputs.patch }} | ||
steps: | ||
- name: Checks-out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Pre release new version | ||
uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
package-name: socle | ||
release-type: node | ||
default-branch: main | ||
group-pull-request-title-pattern: release v${version} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,4 +2,7 @@ | |
vars.yaml | ||
|
||
# compiled filter_plugins | ||
**/__pycache__/* | ||
**/__pycache__/* | ||
|
||
# node modules | ||
node_modules |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,3 @@ | ||
{ | ||
"*.{yml, yaml}": "pnpm run format" | ||
} |
Oops, something went wrong.