Add more config options to Port endpoint of SwitchService
#1068
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: build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| push: | |
| branches: | |
| - main | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| generate: | |
| name: Generate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v7 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: false | |
| - name: Generate | |
| run: make proto generate | |
| - name: Ensure Git is clean | |
| run: | | |
| git diff --exit-code --compact-summary | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Setup bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| working-directory: js | |
| run: bun install --frozen-lockfile | |
| - name: build | |
| run: make build | |
| go: | |
| name: Go | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v7 | |
| - name: Check spelling | |
| uses: crate-ci/typos@master | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: false | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| args: -D protogetter --timeout=5m | |
| python: | |
| name: Python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v7 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Make tag | |
| run: | | |
| [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=v0.0.0.dev-${{ github.event.number }}" >> $GITHUB_ENV || true | |
| [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true | |
| [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=v0.0.0-rc0" >> $GITHUB_ENV || true | |
| - name: Package | |
| run: | | |
| cd python | |
| python -m pip install build | |
| python -m build | |
| env: | |
| VERSION: ${{ env.tag }} | |
| - name: Publish to Test PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.test_pypi_password }} | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| packages-dir: python/dist | |
| if: ${{ github.event_name != 'release' }} | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.pypi_password }} | |
| packages-dir: python/dist | |
| if: ${{ github.event_name == 'release' }} |