Skip to content

Commit ae45d88

Browse files
authored
(MAINT) update mend workflow to use shared tooling (#472)
* (MAINT) update mend workflow to use shared tooling - Removed specific steps for setting up Ruby, Java, and running the scan - Integrated shared tooling workflow from puppetlabs/cat-github-actions - Inherited secrets and set environment variable for PRODUCT_NAME * fix(workflow): correct environment variable syntax in mend.yml Changed the syntax from `env` to `with` for setting the `product_name` in the GitHub Actions workflow file to ensure proper configuration. * Run action on PR for testing purposes * fix(workflow): trigger mend job on closed pull requests - Added 'closed' type to pull_request trigger to ensure mend job runs when PRs are closed. - Uncommented the conditional statement for the mend job to enable it.
1 parent 561faf2 commit ae45d88

File tree

1 file changed

+4
-34
lines changed

1 file changed

+4
-34
lines changed

.github/workflows/mend.yml

+4-34
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,7 @@ on:
1313
jobs:
1414
mend:
1515
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.ref == 'refs/heads/main')
16-
runs-on: "ubuntu-latest"
17-
18-
steps:
19-
- name: "checkout"
20-
uses: "actions/checkout@v4"
21-
with:
22-
fetch-depth: 1
23-
repository: "puppetlabs/puppetlabs-peadm"
24-
ref: "main"
25-
26-
- name: "setup ruby"
27-
uses: "ruby/setup-ruby@v1"
28-
with:
29-
ruby-version: 2.7
30-
31-
- name: "bundle lock"
32-
run: bundle lock
33-
34-
- uses: "actions/setup-java@v4"
35-
with:
36-
distribution: "temurin"
37-
java-version: "17"
38-
39-
- name: "download"
40-
run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
41-
42-
- name: "scan"
43-
run: java -jar wss-unified-agent.jar
44-
env:
45-
WS_APIKEY: ${{ secrets.MEND_API_KEY }}
46-
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
47-
WS_USERKEY: ${{ secrets.MEND_TOKEN }}
48-
WS_PRODUCTNAME: InsTalleR
49-
WS_PROJECTNAME: ${{ github.event.repository.name }}
16+
uses: "puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main"
17+
secrets: "inherit"
18+
with:
19+
product_name: InsTalleR

0 commit comments

Comments
 (0)