|
| 1 | +name: "update-crun-version" |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + schedule: |
| 5 | + # every Wednesday at around 3 am pacific/10 am UTC |
| 6 | + - cron: "0 10 * * 3" |
| 7 | +env: |
| 8 | + GOPROXY: https://proxy.golang.org |
| 9 | + GO_VERSION: '1.22.1' |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + |
| 13 | +jobs: |
| 14 | + bump-crun-version: |
| 15 | + runs-on: ubuntu-20.04 |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 |
| 18 | + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 |
| 19 | + with: |
| 20 | + go-version: ${{env.GO_VERSION}} |
| 21 | + cache-dependency-path: ./go.sum |
| 22 | + - name: Bump crun Version |
| 23 | + id: bumpCrun |
| 24 | + run: | |
| 25 | + echo "OLD_VERSION=$(DEP=crun make get-dependency-version)" >> "$GITHUB_OUTPUT" |
| 26 | + make update-crun-version |
| 27 | + echo "NEW_VERSION=$(DEP=crun make get-dependency-version)" >> "$GITHUB_OUTPUT" |
| 28 | + # 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 |
| 29 | + echo "changes<<EOF" >> "$GITHUB_OUTPUT" |
| 30 | + echo "$(git status --porcelain)" >> "$GITHUB_OUTPUT" |
| 31 | + echo "EOF" >> "$GITHUB_OUTPUT" |
| 32 | + - name: Create PR |
| 33 | + id: createPR |
| 34 | + if: ${{ steps.bumpCrun.outputs.changes != '' }} |
| 35 | + uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e |
| 36 | + with: |
| 37 | + token: ${{ secrets.MINIKUBE_BOT_PAT }} |
| 38 | + commit-message: 'Kicbase/ISO: Update crun from ${{ steps.bumpCrun.outputs.OLD_VERSION }} to ${{ steps.bumpCrun.outputs.NEW_VERSION }}' |
| 39 | + committer: minikube-bot <minikube-bot@google.com> |
| 40 | + author: minikube-bot <minikube-bot@google.com> |
| 41 | + branch: auto_bump_crun_version |
| 42 | + branch-suffix: short-commit-hash |
| 43 | + push-to-fork: minikube-bot/minikube |
| 44 | + base: master |
| 45 | + delete-branch: true |
| 46 | + title: 'Kicbase/ISO: Update crun from ${{ steps.bumpCrun.outputs.OLD_VERSION }} to ${{ steps.bumpCrun.outputs.NEW_VERSION }}' |
| 47 | + body: | |
| 48 | + The crun project released a [new version](https://github.com/containers/crun/releases) |
| 49 | +
|
| 50 | + This PR was auto-generated by `make update-crun-version` using [update-crun-version.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-crun-version.yml) CI Workflow. |
| 51 | + - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea |
| 52 | + if: ${{ steps.bumpCrun.outputs.changes != '' }} |
| 53 | + with: |
| 54 | + github-token: ${{ secrets.MINIKUBE_BOT_PAT }} |
| 55 | + script: | |
| 56 | + github.rest.issues.createComment({ |
| 57 | + issue_number: ${{ steps.createPR.outputs.pull-request-number }}, |
| 58 | + owner: context.repo.owner, |
| 59 | + repo: context.repo.repo, |
| 60 | + body: 'ok-to-build-image' |
| 61 | + }) |
| 62 | + - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea |
| 63 | + if: ${{ steps.bumpCrun.outputs.changes != '' }} |
| 64 | + with: |
| 65 | + github-token: ${{ secrets.MINIKUBE_BOT_PAT }} |
| 66 | + script: | |
| 67 | + github.rest.issues.createComment({ |
| 68 | + issue_number: ${{ steps.createPR.outputs.pull-request-number }}, |
| 69 | + owner: context.repo.owner, |
| 70 | + repo: context.repo.repo, |
| 71 | + body: 'ok-to-build-iso' |
| 72 | + }) |
0 commit comments