Skip to content

nightly-sdk-generation #912

nightly-sdk-generation

nightly-sdk-generation #912

# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt
name: nightly-sdk-generation
on:
schedule:
- cron: 35 4 * * 1-5
workflow_dispatch: {}
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
PROVIDER: aws-native
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TRAVIS_OS_NAME: linux
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }}
PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }}
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
GOVERSION: 1.21.x
NODEVERSION: 20.x
PYTHONVERSION: "3.11"
DOTNETVERSION: |
6.0.x
3.1.301
JAVAVERSION: "11"
AWS_REGION: us-west-2
PULUMI_API: https://api.pulumi-staging.io
jobs:
generate-sdk:
runs-on: ubuntu-latest
name: generate-sdk
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: "**/*.sum"
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v5
with:
pulumi-version-file: .pulumi.version
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 3600
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Cleanup SDK Folder
run: make clean
- name: Preparing Git Branch
run: >
git config --local user.email "[email protected]"
git config --local user.name "pulumi-bot"
git checkout -b generate-sdk/${{ github.run_id }}-${{ github.run_number }}
- name: Commit Empty SDK
run: |-
git add .
git commit -m "Preparing the SDK folder for regeneration"
- name: Discovery
run: make discovery
- name: Build codegen binaries
run: make codegen
- name: Build Schema + SDKs
run: make local_generate
- name: Git submodule commit hash
id: vars
run: echo commit-hash=$(git rev-parse HEAD) >> "$GITHUB_OUTPUT"
working-directory: aws-cloudformation-user-guide
- name: Commit changes
run: >-
git add sdk
git commit -m "Regenerating SDKs based on aws-cloudformation-user-guide @ ${{ steps.vars.outputs.commit-hash }}" || echo "ignore commit failure, may be empty"
git add .
git commit -m "Regenerating based on aws-cloudformation-user-guide @ ${{ steps.vars.outputs.commit-hash }}" || echo "ignore commit failure, may be empty"
git push origin generate-sdk/${{ github.run_id }}-${{ github.run_number }}
- name: Create PR
id: create-pr
uses: repo-sync/[email protected]
with:
destination_branch: master
github_token: ${{ secrets.PULUMI_BOT_TOKEN }}
pr_body: "*Automated PR*"
pr_title: Automated SDK generation @ aws-cloudformation-user-guide ${{
steps.vars.outputs.commit-hash }}
author_name: pulumi-bot
source_branch: generate-sdk/${{ github.run_id }}-${{ github.run_number }}
- if: failure() && github.event_name == 'push'
name: Notify Slack
uses: 8398a7/action-slack@v3
with:
author_name: Failure during automated SDK generation
fields: repo,commit,author,action
status: ${{ job.status }}