Fetch DSO Configs #3
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: Fetch DSO Configs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" # Every day at midnight UTC | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash --noprofile --norc -euo pipefail {0} | |
| jobs: | |
| fetch-configs-and-create-pr: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Fetch DSO configs | |
| id: fetch-dso-configs | |
| run: | | |
| result=$(scripts/fetch-dso-configs.sh) | |
| { | |
| echo "result<<EOF" | |
| echo "$result" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Git config | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Git commit changes and push | |
| run: | | |
| git add configs | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| exit 0 | |
| fi | |
| git commit -m "$COMMIT_MESSAGE" | |
| git push origin | |
| env: | |
| COMMIT_MESSAGE: | | |
| Update DSO configs | |
| ${{ steps.fetch-dso-configs.outputs.result }} |