Update OpenAPI specs to latest #35
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: Update OpenAPI specs to latest | |
| on: | |
| repository_dispatch: | |
| types: [openapi-update] | |
| workflow_dispatch: | |
| jobs: | |
| update-to-latest: | |
| name: "Update specs to latest" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout OpenAPI | |
| uses: actions/checkout@v4 | |
| - name: "Set up Python 3.13" | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install OS packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --allow-downgrades libsnappy-dev jq libvirt-dev | |
| - name: Checkout Community | |
| uses: actions/checkout@v4 | |
| id: community-checkout | |
| continue-on-error: true | |
| with: | |
| repository: localstack/localstack | |
| path: localstack | |
| ref: ${{ github.event.client_payload.ref }} | |
| - name: Community - fallback to main branch | |
| if: steps.community-checkout.outcome == 'failure' | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: localstack/localstack | |
| path: localstack | |
| - name: Checkout Pro | |
| uses: actions/checkout@v4 | |
| id: pro-checkout | |
| continue-on-error: true | |
| with: | |
| repository: localstack/localstack-pro | |
| path: localstack-pro | |
| token: ${{ secrets.PRO_GITHUB_TOKEN }} | |
| ref: ${{ github.event.client_payload.ref }} | |
| - name: Pro - fallback to main branch | |
| if: steps.pro-checkout.outcome == 'failure' | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: localstack/localstack-pro | |
| path: localstack-pro | |
| token: ${{ secrets.PRO_GITHUB_TOKEN }} | |
| - name: Install Python Dependencies for Pro | |
| working-directory: localstack-pro | |
| run: make install | |
| - name: Generate the latest spec | |
| run: | | |
| source localstack-pro/localstack-pro-core/.venv/bin/activate | |
| python bin/update-aws-spec.py --latest | |
| - name: Create PR | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "Update latest OpenAPI spec" | |
| body: "This PR updates the latest version of the LocalStack's OpenAPI spec." | |
| branch: "update-latest" | |
| author: "LocalStack Bot <localstack-bot@users.noreply.github.com>" | |
| committer: "LocalStack Bot <localstack-bot@users.noreply.github.com>" | |
| commit-message: "Update latest OpenAPI spec" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| reviewers: giograno | |
| add-paths: | | |
| openapi/*.yml |