Skip to content

Commit 26c5d16

Browse files
authored
Merge pull request #45 from tencentcloudstack/feat/new-actions
feat/new actions
2 parents 08e8b08 + e9c391c commit 26c5d16

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Auto Pull Request By Release
2+
on:
3+
repository_dispatch:
4+
types: [ webhook ]
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/setup-go@v5
11+
with:
12+
go-version: '1.21'
13+
14+
- name: Install pulumictl
15+
uses: jaxxstorm/[email protected]
16+
with:
17+
repo: pulumi/pulumictl
18+
tag: v0.0.46
19+
20+
- name: Install Pulumi CLI
21+
uses: pulumi/[email protected]
22+
with:
23+
pulumi-version: 3.117.0
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: 21.X
29+
30+
- name: Setup DotNet
31+
uses: actions/setup-dotnet@v1
32+
with:
33+
dotnet-version: 6.0.408
34+
35+
- name: Setup Python
36+
uses: actions/setup-python@v1
37+
with:
38+
python-version: 3.9
39+
40+
- name: generate-code
41+
id: generate-code
42+
run: |
43+
version=`curl https://api.github.com/repos/tencentcloudstack/terraform-provider-tencentcloud/releases/latest --header 'Accept: application/vnd.github+json' --header 'Authorization: Bearer ${{secrets.GITHUB_TOKEN}}' | jq .name | tr -d '"' | tr -d 'v'`
44+
echo "version=$version" >> "$GITHUB_OUTPUT"
45+
46+
git clone https://SevenEarth:${{secrets.GITHUB_TOKEN}}@github.com:tencentcloudstack/pulumi-tencentcloud.git
47+
cd pulumi-tencentcloud
48+
git config --global user.email "[email protected]"
49+
git config --global user.name "SevenEarth"
50+
git checkout -b "feat/sync_provider_${version}"
51+
52+
cd provider && go mod tidy && cd -
53+
make tfgen
54+
make provider
55+
make build_sdks
56+
cd sdk && go mod tidy && cd -
57+
58+
git add .
59+
git commit -sm "sync provider"
60+
git push origin feat/sync_provider_${version}
61+
- name: create pull request
62+
run: |
63+
cd pulumi-tencentcloud
64+
gh pr create -B main -H feat/sync_provider_${{ steps.generate-code.outputs.version }} --title "sync terraform provider" --body "sync terraform provider version to ${{ steps.update-code.outputs.version }}"
65+
env:
66+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)