|
| 1 | +name: Update node image versions |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 8 * * 1' # каждый понедельник 08:00 UTC |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + update-versions: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + contents: write |
| 13 | + pull-requests: write |
| 14 | + |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - uses: actions/setup-go@v5 |
| 19 | + with: |
| 20 | + go-version-file: go.mod |
| 21 | + cache: true |
| 22 | + |
| 23 | + - name: Check for version updates |
| 24 | + run: go run ./cmd/versioncheck --update |
| 25 | + env: |
| 26 | + # Optional: set to avoid Docker Hub anonymous rate limits (600 req/h) |
| 27 | + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} |
| 28 | + |
| 29 | + - name: Verify build after update |
| 30 | + run: go build ./... |
| 31 | + |
| 32 | + - name: Run linter |
| 33 | + uses: golangci/golangci-lint-action@v7 |
| 34 | + with: |
| 35 | + version: v2.11.4 |
| 36 | + |
| 37 | + - name: Run tests |
| 38 | + run: go test ./internal/adapters/... ./internal/registry/... ./api/... |
| 39 | + |
| 40 | + - name: Create PR |
| 41 | + id: cpr |
| 42 | + uses: peter-evans/create-pull-request@v7 |
| 43 | + with: |
| 44 | + token: ${{ secrets.GH_PAT }} |
| 45 | + commit-message: | |
| 46 | + chore: update blockchain node default images |
| 47 | +
|
| 48 | + Ran cmd/versioncheck against upstream registries. |
| 49 | + Updated internal/adapters/versions_gen.go. |
| 50 | + title: 'chore: update node images' |
| 51 | + body: | |
| 52 | + ## Automated image version update |
| 53 | +
|
| 54 | + `cmd/versioncheck` found newer stable tags in upstream registries and updated |
| 55 | + `internal/adapters/versions_gen.go`. |
| 56 | +
|
| 57 | + Pre-releases (alpha/beta/rc), nightly and floating tags (latest, canary) |
| 58 | + are automatically skipped. |
| 59 | +
|
| 60 | + Build, lint and tests passed. Safe to auto-merge. |
| 61 | + branch: chore/update-node-images |
| 62 | + delete-branch: true |
| 63 | + labels: dependencies |
| 64 | + |
| 65 | + - name: Enable auto-merge |
| 66 | + if: steps.cpr.outputs.pull-request-number |
| 67 | + run: gh pr merge --auto --squash "${{ steps.cpr.outputs.pull-request-number }}" |
| 68 | + env: |
| 69 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments