Last modified by chrisby on 2025/04/22 14:54

From version 2.4
edited by chrisby
on 2025/04/22 14:30
Change comment: There is no comment for this version
To version 2.5
edited by chrisby
on 2025/04/22 14:33
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -36,54 +36,52 @@
36 36  
37 37  This is a sample file how the weekly updates can be conducted via GitHub Actions. Create `.github/workflows/weekly-update.yml`:
38 38  
39 -```none
40 -name: Weekly Update
39 + name: Weekly Update
40 +
41 + on:
42 + schedule:
43 + - cron: '0 2 * * 3'
44 + workflow_dispatch:
45 +
46 + permissions:
47 + contents: write
48 + pull-requests: write
49 +
50 + jobs:
51 + weekly-update:
52 + runs-on: ubuntu-latest
53 + steps:
54 + - uses: actions/checkout@v4
55 +
56 + - uses: ./.github/actions/setup
57 +
58 + - name: Run ci-runner update
59 + run: |
60 + go get -u ./...
61 + go mod tidy
62 + go build
63 + # execute the test suite to check whether the updates did not break anything
64 +
65 + - name: Commit and create PR
66 + id: cpr
67 + uses: peter-evans/create-pull-request@v5
68 + with:
69 + commit-message: "chore: weekly ci-runner update"
70 + branch: weekly/ci-update
71 + title: "Weekly CI Runner Update"
72 + delete-branch: true
73 + token: ${{ secrets.GITHUB_TOKEN }}
74 +
75 + - name: Enable Auto-Merge
76 + if: steps.cpr.outputs.pull-request-operation == 'created'
77 + uses: peter-evans/enable-pull-request-automerge@v3
78 + with:
79 + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
80 + merge-method: squash
41 41  
42 -on:
43 - schedule:
44 - - cron: '0 2 * * 3'
45 - workflow_dispatch:
82 +### Git Configuration
46 46  
47 -permissions:
48 - contents: write
49 - pull-requests: write
84 +On your local PC, you need to tell the SDK to use SSH instead of HTTPS to get access.
50 50  
51 -jobs:
52 - weekly-update:
53 - runs-on: ubuntu-latest
54 - steps:
55 - - uses: actions/checkout@v4
56 -
57 - - uses: ./.github/actions/setup
58 -
59 - - name: Run ci-runner update
60 - run: |
61 - go get -u ./...
62 - go mod tidy
63 - go build
64 - # execute the test suite to check whether the updates did not break anything
65 -
66 - - name: Commit and create PR
67 - id: cpr
68 - uses: peter-evans/create-pull-request@v5
69 - with:
70 - commit-message: "chore: weekly ci-runner update"
71 - branch: weekly/ci-update
72 - title: "Weekly CI Runner Update"
73 - delete-branch: true
74 - token: ${{ secrets.GITHUB_TOKEN }}
75 -
76 - - name: Enable Auto-Merge
77 - if: steps.cpr.outputs.pull-request-operation == 'created'
78 - uses: peter-evans/enable-pull-request-automerge@v3
79 - with:
80 - pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
81 - merge-method: squash
82 -```
83 -
84 -### Private Go Repository Dependency
85 -
86 -If you are developing with Go and need a private repository as a dependency, you need to tell the SDK to use SSH instead of HTTPS to get access.
87 -
88 88   git config --global url."ssh://git@github.com/".insteadOf "https://github.com/"
89 89   go env -w GOPRIVATE=github.com/ocelot-cloud/*