diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml index 76f14a3..b717fd2 100644 --- a/.github/workflows/sdk_generation.yaml +++ b/.github/workflows/sdk_generation.yaml @@ -5,6 +5,7 @@ permissions: pull-requests: write statuses: write id-token: write + on: workflow_dispatch: inputs: @@ -14,29 +15,32 @@ on: default: false schedule: - cron: 0 0 * * * + jobs: generate: runs-on: ubuntu-latest steps: - - name: Authenticate with AWS - uses: goshippo/shippo-action-workflows/.github/actions/aws_auth@v1.1.0 - with: - environment: dev-main - oidc-name: shippo-php-sdk-pipeline - login-to-ecr: false - - name: Get Speakeasy Secrets Manager - uses: aws-actions/aws-secretsmanager-get-secrets@v2 - with: - secret-ids: | - dev-main-speakeasy-api-key - name-transformation: uppercase - parse-json-secrets: true - - name: "Speakeasy Generate" - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - speakeasy_version: latest - env: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ env.DEV_MAIN_SPEAKEASY_API_KEY_PHP_API_KEY }} \ No newline at end of file + - name: Authenticate with AWS + uses: goshippo/shippo-action-workflows/.github/actions/aws_auth@v1.1.0 + with: + environment: dev-main + oidc-name: shippo-php-sdk-pipeline + login-to-ecr: false + + - name: Get Speakeasy Secrets Manager + uses: aws-actions/aws-secretsmanager-get-secrets@v2 + with: + secret-ids: | + dev-main-speakeasy-api-key + name-transformation: uppercase + parse-json-secrets: true + + - name: Speakeasy Generate + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 + with: + force: ${{ github.event.inputs.force }} + mode: pr + speakeasy_version: latest + env: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + speakeasy_api_key: ${{ env.DEV_MAIN_SPEAKEASY_API_KEY_PHP_API_KEY }} diff --git a/.github/workflows/sdk_validation.yaml b/.github/workflows/sdk_validation.yaml index a5dc66a..ba7fc23 100644 --- a/.github/workflows/sdk_validation.yaml +++ b/.github/workflows/sdk_validation.yaml @@ -2,6 +2,7 @@ name: Validate permissions: contents: write id-token: write + on: workflow_call: pull_request: @@ -20,6 +21,7 @@ jobs: environment: dev-main oidc-name: shippo-php-sdk-pipeline login-to-ecr: false + - name: Get Speakeasy Secrets Manager uses: aws-actions/aws-secretsmanager-get-secrets@v2 with: @@ -27,21 +29,26 @@ jobs: dev-main-speakeasy-api-key name-transformation: uppercase parse-json-secrets: true + - name: Check out repository uses: actions/checkout@v4 + - name: Set up PHP id: setup_php uses: shivammathur/setup-php@v2 with: php-version: '8.1' + - name: cache dependencies uses: actions/cache@v4 with: path: ./vendor key: python-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('setup.py') }} + - name: Install dependencies run: | make install + - name: Check run: make check env: