Skip to content

Commit

Permalink
Update auto-pull-request-by-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenEarth authored Jul 5, 2024
1 parent f34090c commit 0e94a99
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/auto-pull-request-by-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Auto Pull Request By Release
on:
repository_dispatch:
types: [ webhook ]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
run:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -48,25 +48,25 @@ jobs:
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'`
echo "version=$version" >> "$GITHUB_OUTPUT"
git clone https://SevenEarth:${{secrets.GITHUB_TOKEN}}@github.com:tencentcloudstack/pulumi-tencentcloud.git
git clone https://hellertang:${{secrets.GITHUB_TOKEN}}@github.com/tencentcloudstack/pulumi-tencentcloud.git
cd pulumi-tencentcloud
git config --global user.email "391613297@qq.com"
git config --global user.name "SevenEarth"
git checkout -b "feat/sync_provider_${version}"
cd provider && go mod tidy && cd -
git config --global user.email "hellertang@github.com"
git config --global user.name "hellertang"
git checkout -b "feat/sync_provider_v${version}"
cd provider && go get -v github.com/tencentcloudstack/terraform-provider-tencentcloud@v${version} && go mod tidy && cd -
make tfgen
make provider
make build_sdks
cd sdk && go mod tidy && cd -
git add .
git commit -sm "sync provider"
git push origin feat/sync_provider_${version}
git push origin feat/sync_provider_v${version}
- name: create pull request
run: |
cd pulumi-tencentcloud
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 }}"
gh pr create -B main -H feat/sync_provider_v${{ steps.generate-code.outputs.version }} --title "sync terraform provider v${{ steps.generate-code.outputs.version }}" --body "sync terraform provider version to v${{ steps.update-code.outputs.version }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0e94a99

Please sign in to comment.