diff --git a/.github/actions/generic-npm-build/action.yml b/.github/actions/generic-npm-build/action.yml new file mode 100644 index 0000000000..089992abd5 --- /dev/null +++ b/.github/actions/generic-npm-build/action.yml @@ -0,0 +1,39 @@ +name: Npm Build Script +description: Installs dependencies and builds project with npm +inputs: + working_directory: + description: Working directory to run build commands in + required: true + build_script: + description: Build script in package.json to run + required: false + default: build + version: + description: Version to set in package.json + required: false + default: "" + node_version: + description: Version of nodejs to build with + required: false + default: 18 +runs: + using: composite + steps: + - uses: tw3lveparsecs/github-actions-setvars@v0.1 + - uses: actions/setup-node@v3 + with: + node-version: ${{ inputs.node_version }} + check-latest: true + - name: Set Version + shell: bash + working-directory: ${{ inputs.working_directory }} + run: | + if [ -n "$INPUT_VERSION" ]; then + npm version ${{ inputs.version }} --allow-same-version + fi + - shell: bash + working-directory: ${{ inputs.working_directory }} + run: npm ci + - shell: bash + working-directory: ${{ inputs.working_directory }} + run: npm run ${{ inputs.build_script }} \ No newline at end of file diff --git a/.github/actions/get-dev-version/action.yml b/.github/actions/get-dev-version/action.yml new file mode 100644 index 0000000000..660cd129f5 --- /dev/null +++ b/.github/actions/get-dev-version/action.yml @@ -0,0 +1,18 @@ +name: Get Dev Version +description: Appends commit sha to the version number +inputs: + dir: + description: Directory that package.json is in + required: true +outputs: + version: + description: Version string for dev + value: ${{ steps.get-version.outputs.version }} +runs: + using: composite + steps: + - id: get-version + shell: bash + run: | + VERSION=$(jq -r '.version' ${{ inputs.dir }}/package.json) + echo "::set-output name=version::$VERSION-${GITHUB_SHA:0:7}" \ No newline at end of file diff --git a/.github/pr-labeler-config.yml b/.github/pr-labeler-config.yml deleted file mode 100644 index e4a04b7536..0000000000 --- a/.github/pr-labeler-config.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 1 -labels: - - label: frontend - files: - - frontend/.* - - label: backend - files: - - backend/packages/Upgrade/.* - - backend/Docker.* - - backend/package.json - - backend/package-lock.json - - backend/ts.* - - label: lambda - files: - - backend/packages/Scheduler/.* - - label: types - files: - - types/.* - - label: clientlibs-java - files: - - clientlibs/java/.* - - label: clientlibs-js - files: - - clientlibs/js/.* - - label: cicd - files: - - .github/.* - - label: small-pr - size-below: 30 - - label: feature - branch: ^feature/.* - - label: bugfix - branch: ^bugfix/.* \ No newline at end of file diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml deleted file mode 100644 index 268c2115a7..0000000000 --- a/.github/workflows/auto-merge-dependabot.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Auto Merge Dependabot PRs -on: - pull_request: -jobs: - auto-merge-dependabot-prs: - name: Auto Merge Dependabot PRs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: ahmadnassri/action-dependabot-auto-merge@v2 - with: - github-token: ${{ secrets.REPO_PAT }} - target: major \ No newline at end of file