From 9c23a2cc994ebd7a2ade641ad27564f6228ee76f Mon Sep 17 00:00:00 2001 From: Aaron Gary Date: Tue, 30 Apr 2024 13:57:09 -0700 Subject: [PATCH] # This is a combination of 4 commits. # This is the 1st commit message: #2 Add Maven build workflow # This is the commit message #2: #2 update build workflow # This is the commit message #3: #2 add branch checkout to build workflow # This is the commit message #4: #2 Add on event to build workflow --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..4ccc53b48 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,69 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Build aissemble + +on: + workflow_dispatch: + inputs: + buildBranch: + description: "Branch you want to build" + required: true + type: string + default: '2-build-action' + push: + branches: [ "2-build-action" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.buildBranch }} + - name: Install Python # use direct install rather than pyenv for CI for large speed improvement + uses: actions/setup-python@v5 + with: + python-version: '3.11.4' + - name: Load cached Poetry installation + id: cached-poetry + uses: actions/cache@v4 + with: + path: ~/.local + key: poetry-0 # increment to reset cache + - name: Install Poetry + if: steps.cached-poetry.outputs.cache-hit != 'true' + uses: snok/install-poetry@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Install Docker + run: | + sudo apt-get update + sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update + sudo apt-get install docker-ce docker-ce-cli containerd.io + - name: Install Helm + run: | + curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + chmod 700 get_helm.sh + ./get_helm.sh + - name: Build booz-allen-maven-licenses + run: mvn dependency:resolve --file pom.xml -Dhabushu.usePyenv=false +# run: mvn -B install --file pom.xml -Dhabushu.usePyenv=false + +# # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive +# - name: Update dependency graph +# uses: advanced-security/maven-dependency-submission-action@v3 \ No newline at end of file