Skip to content

Update URLS

Update URLS #815

Workflow file for this run

name: Update URLS
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
updateURLS:
runs-on: ubuntu-latest
steps:
- name: Checkout ide
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout ide-urls
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: Build and run url updater
run: |
mvn -B -ntp -Dstyle.color=always -pl url-updater -am install
mvn -B -ntp -Dstyle.color=always -pl url-updater exec:java -Dexec.mainClass="com.devonfw.tools.ide.url.UpdateInitiator" -Dexec.args="ide-urls PT5H30M"
- 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 urls"
git push
else
echo "No changes, nothing to commit."
fi
trigger_update_cve:
runs-on: ubuntu-latest
needs: updateURLS
steps:
- name: Trigger Update Security Files
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/update-cve.yml/dispatches \
-d '{"ref":"main"}'