From 8b8be6dad8c243b7b3273a703ee5359dd7ff6377 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 30 Jun 2025 22:45:35 -0700 Subject: [PATCH] Create reusable mend action for ruby projects The mend product name is parameterized. --- .github/workflows/mend-ruby.yaml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/mend-ruby.yaml diff --git a/.github/workflows/mend-ruby.yaml b/.github/workflows/mend-ruby.yaml new file mode 100644 index 0000000..5410263 --- /dev/null +++ b/.github/workflows/mend-ruby.yaml @@ -0,0 +1,45 @@ +--- +name: Mend Ruby + +on: + workflow_call: + inputs: + product_name: + required: true + type: string + +jobs: + mend_ruby: + runs-on: ubuntu-latest + name: Mend Ruby + env: + NO_ARTIFACTORY: true + BUNDLE_WITHOUT: test + steps: + - name: Checkout current PR + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1 + bundler-cache: true + - name: Create lock + run: bundle lock + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + - name: Download Mend + run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar + - name: Run Mend + run: java -jar wss-unified-agent.jar + env: + WS_APIKEY: ${{ secrets.MEND_API_KEY }} + WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent + WS_USERKEY: ${{ secrets.MEND_TOKEN }} + WS_PRODUCTNAME: Puppet Core + WS_PROJECTNAME: ${{ inputs.product_name }} + WS_INCLUDE: Gemfile.lock + WS_FILESYSTEMSCAN: false + WS_RESOLVEALLDEPENDENCIES: false + WS_RUBY_RESOLVEDEPENDENCIES: true