Skip to content

Commit faa5f82

Browse files
Dak/ci/fix version update ci (#199)
1 parent f69ad78 commit faa5f82

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/update-versions.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ name: Update Versions
22

33
on:
44
schedule:
5-
- cron: "* */6 * * *"
5+
- cron: "0 */6 * * *"
66
workflow_dispatch:
77

88
jobs:
99
update-versions:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13+
with:
14+
ref: main
1315
- name: update-csharp-version
1416
run: curl -s "https://registry.hub.docker.com/v2/repositories/fernapi/fern-csharp-sdk/tags" | jq -r -j '[.results[] | select(.name != "latest")] | .[0].name' > fern/snippets/version-number-csharp.mdx
1517
- name: update-go-version
@@ -31,10 +33,18 @@ jobs:
3133
commit-message: "update versions from docker hub"
3234
title: "Update versions from docker hub"
3335
branch: update-versions
36+
base: main
3437
delete-branch: true
3538
- name: Enable Pull Request Automerge
3639
if: steps.cpr.outputs.pull-request-operation == 'created'
3740
uses: peter-evans/enable-pull-request-automerge@v3
3841
with:
3942
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
4043
merge-method: squash
44+
- name: Approving PR
45+
if: steps.cpr.outputs.pull-request-operation == 'created'
46+
env:
47+
GH_TOKEN: ${{ secrets.PR_BOT_GH_PAT }}
48+
run: |
49+
echo "Approving PR"
50+
gh pr review ${{ steps.cpr.outputs.pull-request-number }} --approve

0 commit comments

Comments
 (0)