mend #408
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "mend" | |
on: | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
env: | |
ENV_FILE: './pdk-release.env' | |
jobs: | |
mend: | |
uses: "puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main" | |
secrets: "inherit" | |
mend_package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Activate twingate to access PDK builds | |
uses: twingate/github-action@main | |
with: | |
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} | |
- name: Load .env file | |
uses: c-py/action-dotenv-to-setenv@v2 | |
with: | |
env-file: ${{ env.ENV_FILE }} | |
- name: Output release status and a link to the current build | |
run: | | |
echo ${{ env.PDK_RELEASE_TYPE }} | |
echo ${{ env.PDK_VERSION }} | |
echo ${{ env.AMD_INSTALL_FILE }} | |
echo ${{ env.PDK_DEB_URL_AMD64 }} | |
- name: Install PDK | |
run: | | |
wget $PDK_DEB_URL_AMD64; | |
sudo dpkg -i ./${{ env.AMD_INSTALL_FILE }}; | |
sudo apt-get update -y; | |
sudo apt-get install pdk -y; | |
pdk --version; | |
- uses: "ruby/setup-ruby@v1" | |
with: | |
ruby-version: 2.7 | |
- uses: "actions/setup-java@v4" | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Download unified agent | |
run: | | |
curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar; | |
- name: Run Scan | |
run: | | |
sudo -E java -jar wss-unified-agent.jar -d /opt/puppetlabs/pdk | |
env: | |
WS_APIKEY: ${{ secrets.MEND_API_KEY }} | |
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent | |
WS_USERKEY: ${{ secrets.MEND_TOKEN }} | |
WS_PRODUCTNAME: "DevX" | |
WS_PROJECTNAME: "${{ github.event.repository.name }}-package" |