Update code.json #4
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
| # ----------------------------------------------------------------------------- | |
| # GitHub Actions Workflow: generate-codejson.yml | |
| # | |
| # This workflow automates the process of updating the `code.json` file in the | |
| # repository. It can be triggered manually or runs automatically on the first | |
| # day of each month. The workflow: | |
| # 1. Checks out the repository. | |
| # 2. Uses the DSACMS/automated-codejson-generator action to update `code.json` | |
| # and create a pull request with the changes. | |
| # 3. Waits briefly to ensure the pull request is registered. | |
| # 4. Automatically merges the pull request if it is found, then deletes the | |
| # branch. | |
| # | |
| # Required permissions: contents, pull-requests, issues (write access). | |
| # ----------------------------------------------------------------------------- | |
| name: Update code.json | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 1 * *" # monthly on day 1 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| update-code-json: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update code.json | |
| uses: DSACMS/[email protected] | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH: "main" |