grep #6
Workflow file for this run
This file contains 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: Test workflow | |
on: | |
push: | |
branches: [ test ] | |
env: | |
CLIENT_ID: ${{ secrets.CONNECTED_APP_CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CONNECTED_APP_CLIENT_SECRET }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repo | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
- name: Set up NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Install Anypoint CLI | |
run: | | |
npm install -g anypoint-cli-v4 | |
- name: Authenticate to Anypoint CLI | |
run: | | |
anypoint-cli-v4 conf client_id $CLIENT_ID | |
anypoint-cli-v4 conf client_secret $CLIENT_SECRET | |
- name: Retrieve groupId from pom.xml | |
run: | | |
groupId=$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout) | |
- name: Retrieve API RAML version | |
run: | | |
mvn dependency:list -DincludeArtifactIds=squirrel \ | |
--settings .maven/settings.xml \ | |
-DskipMunitTests \ | |
-Dclient.id="$CLIENT_ID" \ | |
-Dclient.secret="$CLIENT_SECRET" | grep ":squirrel:" | grep -Eo "\d+[.]\d+[.]\d+" |