|
5 | 5 | - cron: '0 4 * * *' |
6 | 6 | workflow_dispatch: |
7 | 7 | inputs: |
8 | | - k0s_version: |
9 | | - description: 'K0s version for discovering image versions' |
| 8 | + k0s_minor_version: |
| 9 | + description: 'K0s minor version for discovering image versions' |
10 | 10 | required: false |
11 | 11 | openebs_version: |
12 | 12 | description: 'OpenEBS version for discovering image versions' |
|
54 | 54 | fail-fast: false |
55 | 55 | matrix: |
56 | 56 | addon: |
57 | | - - k0s |
58 | 57 | - openebs |
59 | 58 | - velero |
60 | 59 | - seaweedfs |
|
73 | 72 | IMAGES_REGISTRY_SERVER: index.docker.io |
74 | 73 | IMAGES_REGISTRY_USER: ${{ secrets.DOCKERHUB_USER }} |
75 | 74 | IMAGES_REGISTRY_PASS: ${{ secrets.DOCKERHUB_PASSWORD }} |
76 | | - INPUT_K0S_VERSION: ${{ github.event.inputs.k0s_version }} |
77 | 75 | INPUT_OPENEBS_VERSION: ${{ github.event.inputs.openebs_version }} |
78 | 76 | INPUT_VELERO_VERSION: ${{ github.event.inputs.velero_version }} |
79 | 77 | INPUT_VELERO_AWS_PLUGIN_VERSION: ${{ github.event.inputs.velero_aws_plugin_version }} |
@@ -107,3 +105,53 @@ jobs: |
107 | 105 | run: | |
108 | 106 | echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
109 | 107 | echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
| 108 | +
|
| 109 | + update-k0s-images: |
| 110 | + runs-on: ubuntu-latest |
| 111 | + steps: |
| 112 | + - name: Checkout |
| 113 | + uses: actions/checkout@v5 |
| 114 | + |
| 115 | + - name: Setup Go |
| 116 | + uses: actions/setup-go@v5 |
| 117 | + with: |
| 118 | + go-version-file: go.mod |
| 119 | + cache-dependency-path: "**/*.sum" |
| 120 | + |
| 121 | + - name: Update k0s images |
| 122 | + env: |
| 123 | + IMAGES_REGISTRY_SERVER: index.docker.io |
| 124 | + IMAGES_REGISTRY_USER: ${{ secrets.DOCKERHUB_USER }} |
| 125 | + IMAGES_REGISTRY_PASS: ${{ secrets.DOCKERHUB_PASSWORD }} |
| 126 | + ARCHS: "amd64,arm64" |
| 127 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 128 | + run: | |
| 129 | + k0s_minor_version=$(make print-K0S_MINOR_VERSION) |
| 130 | + if [ -n "${{ github.event.inputs.k0s_minor_version }}" ]; then |
| 131 | + k0s_minor_version="${{ github.event.inputs.k0s_minor_version }}" |
| 132 | + fi |
| 133 | + ./scripts/k0s-update-images.sh "$k0s_minor_version" \ |
| 134 | + UPDATE_ALL_IMAGES=true |
| 135 | +
|
| 136 | + - name: Create Pull Request # creates a PR if there are differences |
| 137 | + uses: peter-evans/create-pull-request@v7 |
| 138 | + id: cpr |
| 139 | + with: |
| 140 | + token: ${{ secrets.GH_PAT }} |
| 141 | + commit-message: 'Update image versions' |
| 142 | + title: "chore: update k0s images" |
| 143 | + branch: automation/k0s-image-dependencies |
| 144 | + delete-branch: true |
| 145 | + labels: | |
| 146 | + automated-pr |
| 147 | + images |
| 148 | + type::security |
| 149 | + draft: false |
| 150 | + base: ${{ github.ref_name }} |
| 151 | + body: "Automated changes by the [image-deps-updater](https://github.com/replicatedhq/embedded-cluster/blob/main/.github/workflows/image-deps-updater.yaml) GitHub action" |
| 152 | + |
| 153 | + - name: Check outputs |
| 154 | + if: ${{ steps.cpr.outputs.pull-request-number }} |
| 155 | + run: | |
| 156 | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
| 157 | + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
0 commit comments