-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 2.31 KB
/
provider-upgrade.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: provider-upgrade
on:
schedule:
- cron: 0 3 * * *
workflow_dispatch: {}
jobs:
upgrade:
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
contents: write
statuses: write
env:
NODE_OPTIONS: --max-old-space-size=6656
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: yarn install
- id: check_version
run: yarn check-if-new-provider-version
- name: get provider current version
id: current_version
if: ${{ steps.check_version.outputs.new_version == 'available' }}
run: echo "value=$(jq -r '.cdktf.provider.version' package.json)" >> $GITHUB_OUTPUT
- if: ${{ steps.check_version.outputs.new_version == 'available' }}
env:
CHECKPOINT_DISABLE: "1"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn fetch
- name: get provider updated version
id: new_version
if: ${{ steps.check_version.outputs.new_version == 'available' }}
run: echo "value=$(jq -r '. | to_entries[] | .value' src/version.json)" >> $GITHUB_OUTPUT
- if: ${{ steps.check_version.outputs.new_version == 'available' }}
run: yarn compile
- if: ${{ steps.check_version.outputs.new_version == 'available' }}
run: yarn docgen
- name: Create Pull Request
if: ${{ steps.check_version.outputs.new_version == 'available' }}
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
commit-message: "fix: upgrade provider from `${{ steps.current_version.outputs.value }}` to version `${{ steps.new_version.outputs.value }}`"
branch: auto/provider-upgrade
title: "fix: upgrade provider from `${{ steps.current_version.outputs.value }}` to version `${{ steps.new_version.outputs.value }}`"
body: This PR upgrades the underlying Terraform provider to version ${{ steps.new_version.outputs.value }}
labels: automerge
token: ${{ secrets.GH_TOKEN }}
delete-branch: true
committer: team-tf-cdk <[email protected]>
author: Team Terraform CDK <[email protected]>
signoff: true