Scheduled Jobs: Upgrade Examples #213
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: "Scheduled Jobs: Upgrade Examples" | |
on: | |
schedule: | |
- cron: "0 6 * * *" | |
workflow_dispatch: {} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
AWS_REGION: "us-west-2" | |
jobs: | |
upgrade: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
go-version: | |
- 1.21.x | |
node-version: | |
- 18.x | |
python-version: | |
- 3.8 | |
dotnet-version: | |
- 6.0.x | |
java-version: | |
- 11 | |
steps: | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: ${{ matrix.java-version }} | |
- name: Install DotNet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: "0.126.0" | |
extended: true | |
- name: Install Pulumi | |
uses: pulumi/actions@v4 | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
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: 14400 # 4 hours | |
role-session-name: pulumi-docs-examples@githubActions | |
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | |
- name: Upgrade and test example programs | |
run: make upgrade-programs test-programs | |
- name: Create a pull request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: examples/upgrade | |
author: Pulumi Bot <[email protected]> | |
committer: Pulumi Bot <[email protected]> | |
title: Upgrade Go module dependencies in example programs | |
# labels: "automation/merge" | |
commit-message: Upgrade Go module dependencies in example programs | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
body: | | |
Upgrades Go module dependencies in example programs to their latest versions. |