Harbor Config Processor #572
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: Harbor Config Processor | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Führt die Action jeden Tag um Mitternacht (UTC) aus | |
| workflow_dispatch: # Ermöglicht manuelles Triggern der Action | |
| permissions: | |
| contents: write | |
| actions: write | |
| jobs: | |
| process-config: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| #with: | |
| # ref: gh-pages | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| - name: Install dependencies | |
| run: | | |
| cd ./docs/harbor | |
| npm install | |
| - name: Fetch and process data from Harbor projects | |
| run: | | |
| cd ./docs/harbor | |
| # Node.js-Skript ausführen, um die Daten aus der config.json zu holen und zu verarbeiten | |
| node fetchAndProcessData.js | |
| - name: Commit and push processed data to docs/harbor | |
| run: | | |
| git config --global user.name 'eclipse-xfsc-bot' | |
| git config --global user.email 'eclipse-xfsc-bot@eclipse.com' | |
| git add -A . | |
| git commit -a -m "Bot update from eclipse gitlab" | |
| git push | |
| - name: Clean up | |
| run: rm -rf node_modules |