Skip to content

fix(deps): update rust crate clap to v4.5.30 #2989

fix(deps): update rust crate clap to v4.5.30

fix(deps): update rust crate clap to v4.5.30 #2989

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
tags:
- v*.*.*
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
- name: Format
run: cargo fmt --all --check
- name: Lint
run: cargo clippy -- -D warnings
- name: Build
run: cargo build
- name: Generate
run: cargo run -- manifests --crd-dir kustomize/crd/bases
- name: Diff
run: test -z "$(git status --porcelain)" || (echo 'Changes detected after generating manifests'; git status; git --no-pager diff; false)
- name: Run unit tests
run: cargo test --lib
integration_tests:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
- uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 # v2.4.0
with:
cluster-name: "kubit-test-cluster-1"
- name: Run all tests
run: cargo test
pack:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
# Allows pushing to the GitHub Container Registry
packages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Depot Docker Build
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- name: Build
if: "!github.event.pull_request.head.repo.fork"
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1
with:
project: v8n5whjnsb
context: .
platforms: linux/amd64,linux/arm64
push: false
tags: ghcr.io/kubecfg/kubit:latest
load: true
- name: Test
if: "!github.event.pull_request.head.repo.fork"
run: |
docker run --rm ghcr.io/kubecfg/kubit:latest --version
- name: Push
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1
with:
project: v8n5whjnsb
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/kubecfg/kubit:latest
if: github.event_name != 'pull_request'
create_release:
name: Create Release
runs-on: ubuntu-latest
needs: [build, pack]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Create Release
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # renovate: tag=v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: true
prerelease: false
release:
# Allow depot permissions to GHCR
permissions:
contents: read
id-token: write
packages: write
needs: [pack, build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Depot Docker Build
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1
- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: release_image
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1
with:
project: v8n5whjnsb
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/kubecfg/kubit:${{ github.ref_name }}