|
| 1 | +name: "update-iso-image-versions" |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | +env: |
| 5 | + GOPROXY: https://proxy.golang.org |
| 6 | + GO_VERSION: '1.21.3' |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | +jobs: |
| 10 | + update-all: |
| 11 | + runs-on: ubuntu-20.04 |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
| 14 | + - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe |
| 15 | + with: |
| 16 | + go-version: ${{env.GO_VERSION}} |
| 17 | + cache-dependency-path: ./go.sum |
| 18 | + - name: Bump versions |
| 19 | + id: bumpVersions |
| 20 | + run: | |
| 21 | + make update-buildkit-version |
| 22 | + make update-cni-plugins-version |
| 23 | + make update-containerd-version |
| 24 | + make update-cri-o-version |
| 25 | + make update-crictl-version |
| 26 | + make update-docker-buildx-version |
| 27 | + make update-docker-version |
| 28 | + make update-nerdctl-version |
| 29 | + make update-runc-version |
| 30 | + make update-ubuntu-version |
| 31 | + # The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings |
| 32 | + echo "changes<<EOF" >> $GITHUB_OUTPUT |
| 33 | + echo "$(git status --porcelain)" >> $GITHUB_OUTPUT |
| 34 | + echo "EOF" >> $GITHUB_OUTPUT |
| 35 | + - name: Create PR |
| 36 | + id: createPR |
| 37 | + if: ${{ steps.bumpVersions.outputs.changes != '' }} |
| 38 | + uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 |
| 39 | + with: |
| 40 | + token: ${{ secrets.MINIKUBE_BOT_PAT }} |
| 41 | + commit-message: 'Kicbase/ISO: Update dependency versions' |
| 42 | + committer: minikube-bot <[email protected]> |
| 43 | + author: minikube-bot <[email protected]> |
| 44 | + branch: bump_iso_image_versions |
| 45 | + branch-suffix: short-commit-hash |
| 46 | + push-to-fork: minikube-bot/minikube |
| 47 | + base: master |
| 48 | + delete-branch: true |
| 49 | + title: 'Kicbase/ISO: Update dependency versions' |
| 50 | + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 |
| 51 | + if: ${{ steps.bumpVersions.outputs.changes != '' }} |
| 52 | + with: |
| 53 | + github-token: ${{ secrets.MINIKUBE_BOT_PAT }} |
| 54 | + script: | |
| 55 | + github.rest.issues.createComment({ |
| 56 | + issue_number: ${{ steps.createPR.outputs.pull-request-number }}, |
| 57 | + owner: context.repo.owner, |
| 58 | + repo: context.repo.repo, |
| 59 | + body: 'ok-to-build-image' |
| 60 | + }) |
| 61 | + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 |
| 62 | + if: ${{ steps.bumpVersions.outputs.changes != '' }} |
| 63 | + with: |
| 64 | + github-token: ${{ secrets.MINIKUBE_BOT_PAT }} |
| 65 | + script: | |
| 66 | + github.rest.issues.createComment({ |
| 67 | + issue_number: ${{ steps.createPR.outputs.pull-request-number }}, |
| 68 | + owner: context.repo.owner, |
| 69 | + repo: context.repo.repo, |
| 70 | + body: 'ok-to-build-iso' |
| 71 | + }) |
0 commit comments