Skip to content

Commit 8b8be6d

Browse files
committed
Create reusable mend action for ruby projects
The mend product name is parameterized.
1 parent 31a26cd commit 8b8be6d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/mend-ruby.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Mend Ruby
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
product_name:
8+
required: true
9+
type: string
10+
11+
jobs:
12+
mend_ruby:
13+
runs-on: ubuntu-latest
14+
name: Mend Ruby
15+
env:
16+
NO_ARTIFACTORY: true
17+
BUNDLE_WITHOUT: test
18+
steps:
19+
- name: Checkout current PR
20+
uses: actions/checkout@v4
21+
- name: Setup Ruby
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: 3.1
25+
bundler-cache: true
26+
- name: Create lock
27+
run: bundle lock
28+
- uses: actions/setup-java@v4
29+
with:
30+
distribution: 'temurin'
31+
java-version: '17'
32+
- name: Download Mend
33+
run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
34+
- name: Run Mend
35+
run: java -jar wss-unified-agent.jar
36+
env:
37+
WS_APIKEY: ${{ secrets.MEND_API_KEY }}
38+
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
39+
WS_USERKEY: ${{ secrets.MEND_TOKEN }}
40+
WS_PRODUCTNAME: Puppet Core
41+
WS_PROJECTNAME: ${{ inputs.product_name }}
42+
WS_INCLUDE: Gemfile.lock
43+
WS_FILESYSTEMSCAN: false
44+
WS_RESOLVEALLDEPENDENCIES: false
45+
WS_RUBY_RESOLVEDEPENDENCIES: true

0 commit comments

Comments
 (0)