Skip to content

nightly-sdk-generation #450

nightly-sdk-generation

nightly-sdk-generation #450

# 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: google-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_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
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 }}
GOOGLE_CI_SERVICE_ACCOUNT_EMAIL: [email protected]
GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci
GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci
GOOGLE_PROJECT: pulumi-ci-gcp-provider
GOOGLE_PROJECT_NUMBER: 895284651812
GOOGLE_REGION: us-central1
GOOGLE_ZONE: us-central1-a
PULUMI_API: https://api.pulumi-staging.io
jobs:
generate-sdk:
runs-on: ubuntu-latest
name: generate-sdk
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
lfs: true
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Languages & Frameworks
uses: ./.github/actions/install
with:
skip_dotnet_and_java: "true"
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
- 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
id: discovery
run: |-
make discovery
git update-index -q --refresh
- name: Build codegen binaries
run: make codegen
- name: Build Schema + SDKs
run: make local_generate
- name: Commit changes
run: >-
git add discovery
git commit -m "Discovery documents"
git add .
git commit -m "Regenerating based on discovery"
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
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 }}