|
| 1 | +# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. |
| 2 | +# |
| 3 | +# Generated on 2025-10-28T14:27:21Z by kres 46e133d. |
| 4 | + |
| 5 | +concurrency: |
| 6 | + group: ${{ github.head_ref || github.run_id }} |
| 7 | + cancel-in-progress: true |
| 8 | +"on": |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - main |
| 12 | + - release-* |
| 13 | + tags: |
| 14 | + - v* |
| 15 | + pull_request: |
| 16 | + branches: |
| 17 | + - main |
| 18 | + - release-* |
| 19 | +name: default |
| 20 | +jobs: |
| 21 | + default: |
| 22 | + permissions: |
| 23 | + actions: read |
| 24 | + contents: write |
| 25 | + issues: read |
| 26 | + packages: write |
| 27 | + pull-requests: read |
| 28 | + runs-on: |
| 29 | + group: generic |
| 30 | + if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) |
| 31 | + steps: |
| 32 | + - name: gather-system-info |
| 33 | + id: system-info |
| 34 | + uses: kenchan0130/[email protected] |
| 35 | + continue-on-error: true |
| 36 | + - name: print-system-info |
| 37 | + run: | |
| 38 | + MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) |
| 39 | +
|
| 40 | + OUTPUTS=( |
| 41 | + "CPU Core: ${{ steps.system-info.outputs.cpu-core }}" |
| 42 | + "CPU Model: ${{ steps.system-info.outputs.cpu-model }}" |
| 43 | + "Hostname: ${{ steps.system-info.outputs.hostname }}" |
| 44 | + "NodeName: ${NODE_NAME}" |
| 45 | + "Kernel release: ${{ steps.system-info.outputs.kernel-release }}" |
| 46 | + "Kernel version: ${{ steps.system-info.outputs.kernel-version }}" |
| 47 | + "Name: ${{ steps.system-info.outputs.name }}" |
| 48 | + "Platform: ${{ steps.system-info.outputs.platform }}" |
| 49 | + "Release: ${{ steps.system-info.outputs.release }}" |
| 50 | + "Total memory: ${MEMORY_GB} GB" |
| 51 | + ) |
| 52 | +
|
| 53 | + for OUTPUT in "${OUTPUTS[@]}";do |
| 54 | + echo "${OUTPUT}" |
| 55 | + done |
| 56 | + continue-on-error: true |
| 57 | + - name: checkout |
| 58 | + uses: actions/checkout@v5 |
| 59 | + - name: Unshallow |
| 60 | + run: | |
| 61 | + git fetch --prune --unshallow |
| 62 | + - name: Set up Docker Buildx |
| 63 | + id: setup-buildx |
| 64 | + uses: docker/setup-buildx-action@v3 |
| 65 | + with: |
| 66 | + driver: remote |
| 67 | + endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 |
| 68 | + timeout-minutes: 10 |
| 69 | + - name: base |
| 70 | + run: | |
| 71 | + make base |
| 72 | + - name: omni-infra-provider-libvirt |
| 73 | + run: | |
| 74 | + make omni-infra-provider-libvirt |
| 75 | + - name: Login to registry |
| 76 | + if: github.event_name != 'pull_request' |
| 77 | + uses: docker/login-action@v3 |
| 78 | + with: |
| 79 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 80 | + registry: ghcr.io |
| 81 | + username: ${{ github.repository_owner }} |
| 82 | + - name: image-omni-infra-provider-libvirt |
| 83 | + run: | |
| 84 | + make image-omni-infra-provider-libvirt |
| 85 | + - name: push-omni-infra-provider-libvirt |
| 86 | + if: github.event_name != 'pull_request' |
| 87 | + env: |
| 88 | + PUSH: "true" |
| 89 | + run: | |
| 90 | + make image-omni-infra-provider-libvirt |
| 91 | + - name: push-omni-infra-provider-libvirt-latest |
| 92 | + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' |
| 93 | + env: |
| 94 | + PUSH: "true" |
| 95 | + run: | |
| 96 | + make image-omni-infra-provider-libvirt IMAGE_TAG=latest |
| 97 | + - name: Generate Checksums |
| 98 | + if: startsWith(github.ref, 'refs/tags/') |
| 99 | + run: | |
| 100 | + cd _out |
| 101 | + sha256sum omni-infra-provider-libvirt-* > sha256sum.txt |
| 102 | + sha512sum omni-infra-provider-libvirt-* > sha512sum.txt |
| 103 | + - name: release-notes |
| 104 | + if: startsWith(github.ref, 'refs/tags/') |
| 105 | + run: | |
| 106 | + make release-notes |
| 107 | + - name: Release |
| 108 | + if: startsWith(github.ref, 'refs/tags/') |
| 109 | + uses: softprops/action-gh-release@v2 |
| 110 | + with: |
| 111 | + body_path: _out/RELEASE_NOTES.md |
| 112 | + draft: "true" |
| 113 | + files: |- |
| 114 | + _out/omni-infra-provider-libvirt-* |
| 115 | + _out/sha*.txt |
| 116 | + lint: |
| 117 | + runs-on: |
| 118 | + group: generic |
| 119 | + if: github.event_name == 'pull_request' |
| 120 | + needs: |
| 121 | + - default |
| 122 | + steps: |
| 123 | + - name: gather-system-info |
| 124 | + id: system-info |
| 125 | + uses: kenchan0130/[email protected] |
| 126 | + continue-on-error: true |
| 127 | + - name: print-system-info |
| 128 | + run: | |
| 129 | + MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) |
| 130 | +
|
| 131 | + OUTPUTS=( |
| 132 | + "CPU Core: ${{ steps.system-info.outputs.cpu-core }}" |
| 133 | + "CPU Model: ${{ steps.system-info.outputs.cpu-model }}" |
| 134 | + "Hostname: ${{ steps.system-info.outputs.hostname }}" |
| 135 | + "NodeName: ${NODE_NAME}" |
| 136 | + "Kernel release: ${{ steps.system-info.outputs.kernel-release }}" |
| 137 | + "Kernel version: ${{ steps.system-info.outputs.kernel-version }}" |
| 138 | + "Name: ${{ steps.system-info.outputs.name }}" |
| 139 | + "Platform: ${{ steps.system-info.outputs.platform }}" |
| 140 | + "Release: ${{ steps.system-info.outputs.release }}" |
| 141 | + "Total memory: ${MEMORY_GB} GB" |
| 142 | + ) |
| 143 | +
|
| 144 | + for OUTPUT in "${OUTPUTS[@]}";do |
| 145 | + echo "${OUTPUT}" |
| 146 | + done |
| 147 | + continue-on-error: true |
| 148 | + - name: checkout |
| 149 | + uses: actions/checkout@v5 |
| 150 | + - name: Unshallow |
| 151 | + run: | |
| 152 | + git fetch --prune --unshallow |
| 153 | + - name: Set up Docker Buildx |
| 154 | + id: setup-buildx |
| 155 | + uses: docker/setup-buildx-action@v3 |
| 156 | + with: |
| 157 | + driver: remote |
| 158 | + endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 |
| 159 | + timeout-minutes: 10 |
| 160 | + - name: lint |
| 161 | + run: | |
| 162 | + make lint |
| 163 | + unit-tests: |
| 164 | + runs-on: |
| 165 | + group: generic |
| 166 | + if: github.event_name == 'pull_request' |
| 167 | + needs: |
| 168 | + - default |
| 169 | + steps: |
| 170 | + - name: gather-system-info |
| 171 | + id: system-info |
| 172 | + uses: kenchan0130/[email protected] |
| 173 | + continue-on-error: true |
| 174 | + - name: print-system-info |
| 175 | + run: | |
| 176 | + MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) |
| 177 | +
|
| 178 | + OUTPUTS=( |
| 179 | + "CPU Core: ${{ steps.system-info.outputs.cpu-core }}" |
| 180 | + "CPU Model: ${{ steps.system-info.outputs.cpu-model }}" |
| 181 | + "Hostname: ${{ steps.system-info.outputs.hostname }}" |
| 182 | + "NodeName: ${NODE_NAME}" |
| 183 | + "Kernel release: ${{ steps.system-info.outputs.kernel-release }}" |
| 184 | + "Kernel version: ${{ steps.system-info.outputs.kernel-version }}" |
| 185 | + "Name: ${{ steps.system-info.outputs.name }}" |
| 186 | + "Platform: ${{ steps.system-info.outputs.platform }}" |
| 187 | + "Release: ${{ steps.system-info.outputs.release }}" |
| 188 | + "Total memory: ${MEMORY_GB} GB" |
| 189 | + ) |
| 190 | +
|
| 191 | + for OUTPUT in "${OUTPUTS[@]}";do |
| 192 | + echo "${OUTPUT}" |
| 193 | + done |
| 194 | + continue-on-error: true |
| 195 | + - name: checkout |
| 196 | + uses: actions/checkout@v5 |
| 197 | + - name: Unshallow |
| 198 | + run: | |
| 199 | + git fetch --prune --unshallow |
| 200 | + - name: Set up Docker Buildx |
| 201 | + id: setup-buildx |
| 202 | + uses: docker/setup-buildx-action@v3 |
| 203 | + with: |
| 204 | + driver: remote |
| 205 | + endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 |
| 206 | + timeout-minutes: 10 |
| 207 | + - name: unit-tests |
| 208 | + run: | |
| 209 | + make unit-tests |
| 210 | + - name: unit-tests-race |
| 211 | + run: | |
| 212 | + make unit-tests-race |
| 213 | + - name: coverage |
| 214 | + uses: codecov/codecov-action@v5 |
| 215 | + with: |
| 216 | + files: _out/coverage-unit-tests.txt |
| 217 | + flags: unit-tests |
| 218 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 219 | + timeout-minutes: 3 |
0 commit comments