{"owner":"maximhq","repo":"bifrost","hasSpec":true,"specFile":".github/workflows/openapi-bundle.yml","branch":"HEAD","format":"yaml","version":"3.x (YAML)","title":"bifrost","description":"","endpoints":[],"spec":"name: OpenAPI Bundle\n\non:\n  push:\n    branches: [\"main\"]\n    paths:\n      - \".github/workflows/openapi-bundle.yml\"\n      - \"docs/openapi/**\"\n      - \"!docs/openapi/openapi.json\"\n\npermissions:\n  contents: write\n\njobs:\n  bundle-openapi:\n    name: Bundle OpenAPI Spec\n    runs-on: ubuntu-latest\n    steps:\n      - name: Harden Runner\n        uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1\n        with:\n          egress-policy: block\n          allowed-endpoints: >\n            files.pythonhosted.org:443\n            github.com:443\n            pypi.org:443\n\n      - name: Checkout repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n        with:\n          token: ${{ secrets.GH_TOKEN }}\n\n      - name: Set up Python\n        uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0\n        with:\n          python-version: \"3.11\"\n\n      - name: Configure Git\n        run: |\n          git config user.name \"GitHub Actions Bot\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n\n      - name: Install dependencies\n        run: pip install pyyaml\n\n      - name: Bundle OpenAPI spec\n        working-directory: ./docs/openapi\n        run: python bundle.py\n\n      - name: Commit and push changes\n        if: github.event_name == 'push'\n        run: |\n          CURRENT_BRANCH=\"${GITHUB_REF_NAME:-main}\"\n\n          git add docs/openapi/openapi.json\n          if git diff --staged --quiet; then\n            echo \"No changes to commit\"\n            exit 0\n          fi\n          git commit -m \"chore: regenerate openapi.json --skip-ci\"\n          git push origin \"$CURRENT_BRANCH\"\n"}