Skip to content

Commit

Permalink
pending changes for finos move
Browse files Browse the repository at this point in the history
  • Loading branch information
PayalKhanna committed Jun 12, 2024
1 parent b1d0b7d commit 09272f1
Show file tree
Hide file tree
Showing 31 changed files with 1,187 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/actions/maven-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Maven Build
description: Run a Maven Build

inputs:
build-command:
description: The Maven command to build the project. The default is `package`.
required: false
# type: string - `type` field is not supported (yet). See comment below.
default: package
run-tests:
description: Whether or not to run tests. The default is true.
required: false
# type: boolean - This is not supported (yet). All inputs are of type `string`. See https://github.com/actions/runner/issues/2238.
default: 'true'

runs:
using: "composite"
steps:
- name: Set up JDK 17 for x64
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
architecture: x64
cache: maven
server-id: ossrh
server-username: CI_DEPLOY_USERNAME
server-password: CI_DEPLOY_PASSWORD
- name: Build with Maven
shell: bash
run: mvn -B -U clean ${{ inputs.build-command }}${{ inputs.run-tests == 'false' && ' -DskipTests' || '' }}
15 changes: 15 additions & 0 deletions .github/actions/normalize-branch-name/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Normalize branch name"
description: "Normalizes the branch name"
inputs:
branch:
description: "Branch name to normalize. Defaults to $GITHUB_HEAD_REF"
required: false
outputs:
normalized:
description: "Normalized branch name"
runs:
using: "node12"
main: "index.js"
branding:
icon: 'terminal'
color: 'green'
17 changes: 17 additions & 0 deletions .github/actions/normalize-branch-name/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const core = require("@actions/core");
try {
const input = core.getInput("branch") ? core.getInput("branch") : process.env.GITHUB_HEAD_REF ? process.env.GITHUB_HEAD_REF : process.env.GITHUB_REF ? process.env.GITHUB_REF.replace("refs/heads/", "") : null;
if (!input) {
throw new Error("No branch was found.");
}
let output = input
.trim()
.toLowerCase()
.replace(/([^0-9a-zA-Z-]+)/g, "-");
core.setOutput("normalized", output);
if (output.charAt(output.length - 1) == '-') {
output = output.substring(0, output.length - 1);
}
} catch (err) {
core.setFailed(err);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 09272f1

Please sign in to comment.