diff --git a/.github/workflows/update-versions.yml b/.github/workflows/update-versions.yml index 5a18b72b9..96d529ec0 100644 --- a/.github/workflows/update-versions.yml +++ b/.github/workflows/update-versions.yml @@ -2,7 +2,7 @@ name: Update Versions on: schedule: - - cron: "* */6 * * *" + - cron: "0 */6 * * *" workflow_dispatch: jobs: @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: main - name: update-csharp-version 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 - name: update-go-version @@ -31,6 +33,7 @@ jobs: commit-message: "update versions from docker hub" title: "Update versions from docker hub" branch: update-versions + base: main delete-branch: true - name: Enable Pull Request Automerge if: steps.cpr.outputs.pull-request-operation == 'created' @@ -38,3 +41,10 @@ jobs: with: pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} merge-method: squash + - name: Approving PR + if: steps.cpr.outputs.pull-request-operation == 'created' + env: + GH_TOKEN: ${{ secrets.PR_BOT_GH_PAT }} + run: | + echo "Approving PR" + gh pr review ${{ steps.cpr.outputs.pull-request-number }} --approve \ No newline at end of file