fix(service): ArgoCD service environment and icon fields #2682
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: Generate API Clients | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| actions: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: success() | |
| env: | |
| # We only want to publish to client repositories when pushing on main branch | |
| PUBLISH_CLIENTS: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| strategy: | |
| matrix: | |
| include: | |
| - language: go | |
| version: 7.6.0 | |
| git-user-id: qovery | |
| target-branch: master | |
| deploy-ssh-key: SSH_DEPLOY_KEY_GO | |
| deploy-ssh-key-ws: SSH_DEPLOY_KEY_WS_GO | |
| - language: typescript-axios | |
| version: 7.8.0 | |
| git-user-id: Qovery | |
| target-branch: main | |
| deploy-ssh-key: SSH_DEPLOY_KEY_TYPESCRIPT_AXIOS | |
| deploy-ssh-key-ws: SSH_DEPLOY_KEY_WS_TYPESCRIPT_AXIOS | |
| - language: rust | |
| version: 7.20.0 | |
| git-user-id: qovery | |
| target-branch: main | |
| deploy-ssh-key: SSH_DEPLOY_KEY_RUST | |
| deploy-ssh-key-ws: SSH_DEPLOY_KEY_WS_RUST | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| if: contains(matrix.language, 'go') | |
| with: | |
| go-version: "1.26" | |
| cache: false | |
| - name: Install rust toolchain for Linux | |
| if: contains(matrix.language, 'rust') | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.88" | |
| components: rustfmt | |
| - name: Build OpenApi file | |
| run: | | |
| npm ci | |
| - name: Generate ${{ matrix.language }} client | |
| uses: openapi-generators/openapitools-generator-action@v1 | |
| env: | |
| GO_POST_PROCESS_FILE: "/usr/local/bin/gofmt -w" | |
| with: | |
| generator: ${{ matrix.language }} | |
| generator-tag: v${{ matrix.version }} | |
| openapi-file: openapi.yaml | |
| config-file: "generator/configs/${{ matrix.language }}.yaml" | |
| command-args: | | |
| -a bearer \ | |
| -o out/qovery-client-${{ matrix.language }} \ | |
| --enable-post-process-file \ | |
| --git-user-id ${{ matrix.git-user-id }} \ | |
| --git-repo-id qovery-client-${{ matrix.language }} \ | |
| --package-name qovery \ | |
| --additional-properties packageVersion=$(grep 'version' openapi.yaml | head -1 | tr ':' '\n' | tail -1 | tr -d ' ') \ | |
| --additional-properties npmVersion=$(grep 'version' openapi.yaml | head -1 | tr ':' '\n' | tail -1 | tr -d ' ') | |
| - name: Generate ${{ matrix.language }} websocket client | |
| uses: openapi-generators/openapitools-generator-action@v1 | |
| env: | |
| GO_POST_PROCESS_FILE: "/usr/local/bin/gofmt -w" | |
| with: | |
| generator: ${{ matrix.language }} | |
| generator-tag: v${{ matrix.version }} | |
| openapi-file: websocket/websocket-openapi.yaml | |
| config-file: "generator/configs/${{ matrix.language }}-ws.yaml" | |
| command-args: | | |
| -a bearer \ | |
| -o out/qovery-client-ws-${{ matrix.language }} \ | |
| --enable-post-process-file \ | |
| --git-user-id ${{ matrix.git-user-id }} \ | |
| --git-repo-id qovery-client-ws-${{ matrix.language }} \ | |
| --package-name qovery-ws \ | |
| --additional-properties packageVersion=$(grep 'version' websocket/websocket-openapi.yaml | head -1 | tr ':' '\n' | tail -1 | tr -d ' ') \ | |
| --additional-properties npmVersion=$(grep 'version' websocket/websocket-openapi.yaml | head -1 | tr ':' '\n' | tail -1 | tr -d ' ') | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: output-${{ matrix.language }} | |
| path: out | |
| - name: Run ${{ matrix.language }} post generation script | |
| run: | | |
| if [ -f "generator/post_generation_scripts/${{ matrix.language }}.sh" ]; then | |
| generator/post_generation_scripts/${{ matrix.language }}.sh | |
| fi | |
| - name: Run ${{ matrix.language }} websocket post generation script | |
| run: | | |
| if [ -f "generator/post_generation_scripts/${{ matrix.language }}-ws.sh" ]; then | |
| generator/post_generation_scripts/${{ matrix.language }}-ws.sh | |
| fi | |
| - name: Publish ${{ matrix.language }} client | |
| if: contains(env.PUBLISH_CLIENTS, 'true') | |
| id: push_directory | |
| uses: cpina/github-action-push-to-another-repository@main | |
| env: | |
| SSH_DEPLOY_KEY: ${{ secrets[matrix.deploy-ssh-key] }} | |
| with: | |
| source-directory: out/qovery-client-${{ matrix.language }} | |
| destination-github-username: "qovery" | |
| destination-repository-name: "qovery-client-${{ matrix.language }}" | |
| user-email: github@qovery.com | |
| commit-message: See ORIGIN_COMMIT from $GITHUB_REF | |
| target-branch: ${{ matrix.target-branch }} | |
| - name: Publish ${{ matrix.language }} websocket client | |
| if: contains(env.PUBLISH_CLIENTS, 'true') | |
| id: push_directory_ws | |
| uses: cpina/github-action-push-to-another-repository@main | |
| env: | |
| SSH_DEPLOY_KEY: ${{ secrets[matrix.deploy-ssh-key-ws] }} | |
| with: | |
| source-directory: out/qovery-client-ws-${{ matrix.language }} | |
| destination-github-username: "qovery" | |
| destination-repository-name: "qovery-client-ws-${{ matrix.language }}" | |
| user-email: github@qovery.com | |
| commit-message: See ORIGIN_COMMIT from $GITHUB_REF | |
| target-branch: main |