Skip to content

weekly-pulumi-update #124

weekly-pulumi-update

weekly-pulumi-update #124

name: weekly-pulumi-update
"on":
schedule:
- cron: 35 12 * * 4
workflow_dispatch: {}
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
jobs:
update-go-mod:
name: Update Go mods
runs-on: ubuntu-latest
strategy:
matrix:
goversion: [1.21.x]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goversion }}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.1.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v4
- name: Preparing Git Branch
run: |
git config --local user.email "bot@pulumi.com"
git config --local user.name "pulumi-bot"
git checkout -b update-pulumi/${{ github.run_id }}-${{ github.run_number }}
- name: Update pulumi/pulumi
id: gomod
run: |
go get github.com/pulumi/pulumi/sdk/v3
make dep-tidy
git update-index -q --refresh
if ! git diff-files --quiet; then
echo changes=1 >> "$GITHUB_OUTPUT"
fi
- name: Build codegen + Schema + SDKs
if: steps.gomod.outputs.changes != 0
run: make build
- name: Commit changes
if: steps.gomod.outputs.changes != 0
run: |
git add .
git commit -m "Updated modules"
git push origin update-pulumi/${{ github.run_id }}-${{ github.run_number }}
- name: Open a pull request
if: steps.gomod.outputs.changes != 0
uses: repo-sync/pull-request@v2
with:
source_branch: "update-pulumi/${{ github.run_id }}-${{ github.run_number }}"
destination_branch: "master"
pr_title: "Automated pulumi/pulumi upgrade"
pr_label: "automation/merge"
pr_allow_empty: true
github_token: ${{ secrets.PULUMI_BOT_TOKEN }}