weekly-pulumi-update #148
This file contains 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: 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.23.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/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi CLI | |
uses: pulumi/actions@c7fad9e2f0b79653172b36538b8b34b3c0291952 # v6 | |
- name: Preparing Git Branch | |
run: | | |
git config --local user.email "[email protected]" | |
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 | |
go mod 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 }} |