Settings #2106
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: Settings | |
| on: | |
| schedule: | |
| - cron: "0 */4 * * *" | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - safe-settings/** | |
| - .github/workflows/safe-settings.yml | |
| # safe-settings authenticates via the OCMBOT GitHub App (APP_ID/PRIVATE_KEY), | |
| # so GITHUB_TOKEN only needs read access for checkout. | |
| permissions: | |
| contents: read | |
| jobs: | |
| safeSettingsSync: | |
| name: synchronize settings | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: automations | |
| deployment: false | |
| env: | |
| SAFE_SETTINGS_CODE_DIR: "${{ github.workspace }}/.safe-settings-code" | |
| steps: | |
| - name: Checkout .github (our safe-settings configuration) | |
| uses: actions/checkout@v6 | |
| - name: Checkout github/safe-settings (app) to run full-sync | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: github/safe-settings | |
| ref: '2.1.18' | |
| path: "$SAFE_SETTINGS_CODE_DIR" | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| - name: Build safe-settings app | |
| run: npm install | |
| working-directory: "$SAFE_SETTINGS_CODE_DIR" | |
| - name: Run safe-settings full-sync | |
| run: npm run full-sync | |
| working-directory: "$SAFE_SETTINGS_CODE_DIR" | |
| env: | |
| GH_ORG: open-component-model | |
| APP_ID: ${{ secrets.OCMBOT_APP_ID }} | |
| PRIVATE_KEY: ${{ secrets.OCMBOT_PRIV_KEY }} | |
| GITHUB_CLIENT_ID: ${{ secrets.OCMBOT_CLIENT_ID }} | |
| GITHUB_CLIENT_SECRET: ${{ secrets.OCMBOT_CLIENT_SECRET }} | |
| # https://github.com/open-component-model/.github | |
| ADMIN_REPO: .github | |
| LOG_LEVEL: trace | |
| # https://github.com/open-component-model/.github/tree/main/safe-settings | |
| CONFIG_PATH: safe-settings | |
| DEPLOYMENT_CONFIG_FILE: ${{ github.workspace }}/safe-settings/config.yml |