temp: Persist creds #13
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: Re Generate Docs | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout vmware/build-tools-for-vmware-aria repository | |
uses: actions/checkout@v4 | |
- name: Install xmllint | |
run: sudo apt-get install libxml2-utils | |
- name: Setup Maven Action | |
uses: s4u/[email protected] | |
with: | |
java-version: 17 | |
java-distribution: "temurin" | |
maven-version: 3.9.2 | |
- name: Install necessary components | |
run: | | |
mvn clean install -f common/artifact-manager/pom.xml -DskipTests | |
mvn clean install -f maven/plugins/pom.xml | |
- name: Generate plugin arguments | |
run: | | |
for POM_PATH in $(find maven/plugins -mindepth 2 -maxdepth 2 -name pom.xml -type f -not -path "maven/plugins/common/*"); do # Not recommended, will break on whitespace | |
echo "Processing $POM_PATH..." | |
GROUP_ID=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="parent"]/*[local-name()="groupId"]/text()' $POM_PATH) | |
echo "Group ID: $GROUP_ID" | |
ARTIFACT_ID=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="artifactId"]/text()' $POM_PATH) | |
echo "Artifact ID: $ARTIFACT_ID" | |
PLUGIN_VERSION=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="parent"]/*[local-name()="version"]/text()' $POM_PATH) | |
echo "Version: $PLUGIN_VERSION" | |
PLUGIN_FOLDER=$(dirname $POM_PATH) | |
PLUGIN_FOLDER="${PLUGIN_FOLDER##*/}" | |
echo "Plugin Folder: $PLUGIN_FOLDER" | |
mvn help:describe -D"groupId=$GROUP_ID" -D"artifactId=$ARTIFACT_ID" -D"version=$PLUGIN_VERSION" -Ddetail --batch-mode -f $POM_PATH -D"output=docs/versions/latest/General/Cheatsheets/$PLUGIN_FOLDER-plugin-arguments.md" | |
done | |
- name: Print current branch | |
run: echo "Current branch is $GITHUB_REF" | |
- name: Print current branch | |
run: git status | |
- name: Commit | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "WWCoE CI admin" | |
git add docs** | |
git commit -m "Re-generate plugin arguments" | |
git push |