Update Security Files #58
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: Update Security Files | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| update-security-json: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout IDEasy Repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Checkout ide-urls Repository | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: devonfw/ide-urls | |
| path: ide-urls | |
| token: ${{ secrets.ACTION_PUSH_TOKEN }} | |
| - name: Set up Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Cache CVE Database | |
| id: cache-cve | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository/org/owasp/dependency-check-utils/ | |
| key: owasp-cve-db-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| owasp-cve-db-${{ runner.os }}- | |
| owasp-cve-db- | |
| - name: Build all modules | |
| run: mvn -B -ntp -Dstyle.color=always -DskipTests -pl security -am install | |
| - name: Run security JSON generator | |
| run: | | |
| mvn -B -ntp -Dstyle.color=always -pl security exec:java \ | |
| -Dexec.mainClass="com.devonfw.tools.IDEasy.dev.BuildSecurityJsonFiles" \ | |
| -Dexec.args="${{ github.workspace }}/ide-urls" \ | |
| continue-on-error: true | |
| - name: Commit and push to ide-urls | |
| run: | | |
| cd ide-urls | |
| git config --global user.name ${{ secrets.BUILD_USER }} | |
| git config --global user.email ${{ secrets.BUILD_USER_EMAIL }} | |
| if git status -z | grep -q . | |
| then | |
| git add . | |
| git commit -m "Update security.json files [auto]" | |
| git push --force | |
| else | |
| echo "No changes, nothing to commit." | |
| fi |