feat(container): update image ghcr.io/tchapi/davis ( 5.3.0 β 5.4.0 ) #1317
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Image Pull | |
| 'on': | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| filter: | |
| name: Image Pull - Filter | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changed-files: ${{ steps.changed-files.outputs.changed_files }} | |
| steps: | |
| - name: Get Changed Files | |
| id: changed-files | |
| uses: bjw-s-labs/action-changed-files@015416e33c709af88f84a4496f4030c1f0ef212e # v0.5.0 | |
| with: | |
| patterns: kubernetes/**/* | |
| extract: | |
| if: ${{ needs.filter.outputs.changed-files != '[]' }} | |
| needs: filter | |
| name: Image Pull - Extract Images | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| branch: | |
| - default | |
| - pull | |
| fail-fast: false | |
| outputs: | |
| default: ${{ steps.extract.outputs.default }} | |
| pull: ${{ steps.extract.outputs.pull }} | |
| steps: | |
| - name: Generate Token | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.BOT_APP_ID }} | |
| private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ matrix.branch == 'default' && github.event.repository.default_branch || '' }} | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Gather Images | |
| uses: docker://ghcr.io/allenporter/flux-local:v8.1.0 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| with: | |
| args: >- | |
| get cluster | |
| --all-namespaces | |
| --path /github/workspace/kubernetes/clusters/deedee/bootstrap | |
| --enable-images | |
| --only-images | |
| --output json | |
| --output-file images.json | |
| - name: Extract Images | |
| id: extract | |
| run: |- | |
| echo "${{ matrix.branch }}=$(jq --compact-output '.' images.json)" >> "$GITHUB_OUTPUT" | |
| { echo '## Branch ${{ matrix.branch }} images'; \ | |
| echo '```json'; \ | |
| jq '.' images.json; \ | |
| echo '```'; } >> "$GITHUB_STEP_SUMMARY" | |
| diff: | |
| if: ${{ needs.extract.outputs.default != needs.extract.outputs.pull }} | |
| needs: extract | |
| name: Image Pull - Diff Images | |
| runs-on: ubuntu-latest | |
| outputs: | |
| images: ${{ steps.diff.outputs.images }} | |
| steps: | |
| - name: Diff Images | |
| id: diff | |
| run: |- | |
| images=$(jq --compact-output --null-input \ | |
| --argjson f1 "${OUTPUTS_DEFAULT}" \ | |
| --argjson f2 "${OUTPUTS_PULL}" \ | |
| '$f2 - $f1' \ | |
| ) | |
| echo "images=${images}" >> "$GITHUB_OUTPUT" | |
| { echo '## New images to Pull'; \ | |
| echo '```json'; \ | |
| echo "$images" | jq; | |
| echo '```'; } >> "$GITHUB_STEP_SUMMARY" | |
| env: | |
| OUTPUTS_DEFAULT: "${{ needs.extract.outputs.default }}" | |
| OUTPUTS_PULL: "${{ needs.extract.outputs.pull }}" | |
| pull: | |
| if: ${{ needs.diff.outputs.images != '[]' }} | |
| needs: diff | |
| name: Image Pull - Pull Images | |
| runs-on: home-ops-runner | |
| strategy: | |
| matrix: | |
| image: ${{ fromJSON(needs.diff.outputs.images) }} | |
| max-parallel: 4 | |
| fail-fast: false | |
| env: | |
| MATRIX_IMAGE: ${{ matrix.image }} | |
| steps: | |
| - name: Install talosctl | |
| run: >- | |
| curl -fsSL | |
| https://raw.githubusercontent.com/siderolabs/talos/b412ffdbc29d77a81aed88be62f21bc2999afcde/website/static/install | |
| | sh | |
| - name: Pull Image | |
| run: talosctl --nodes "$NODE" image pull "${MATRIX_IMAGE}" | |
| success: | |
| if: ${{ !cancelled() }} | |
| needs: pull | |
| name: Image Pull - Success | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Any jobs failed? | |
| if: ${{ contains(needs.*.result, 'failure') }} | |
| run: exit 1 | |
| - name: All jobs passed or skipped? | |
| if: ${{ !(contains(needs.*.result, 'failure')) }} | |
| run: echo "All jobs passed or skipped" && echo "${RESULT}" | |
| env: | |
| RESULT: ${{ toJSON(needs.*.result) }} |