Skip to content

build(deps): Bump reqwest from 0.12.9 to 0.12.11 #320

build(deps): Bump reqwest from 0.12.9 to 0.12.11

build(deps): Bump reqwest from 0.12.9 to 0.12.11 #320

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
tags: [ '*' ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build
run: cargo build --locked --all-features
- name: Test
run: cargo test --locked --all-features
- name: Format
uses: actions-rust-lang/rustfmt@v1
- name: Clippy
run: cargo clippy -- -Dwarnings
- name: Completions
run: |
cargo run --bin kafka-proxy-completions -- zsh > completions/_kafka-proxy.completions.zsh
git diff --no-ext-diff --exit-code -- completions/
build:
name: Build Artifact (${{ matrix.target }})
needs: check
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
suffix: x86_64-linux-gnu
cargo: cargo
- target: x86_64-unknown-linux-musl
suffix: x86_64-linux-musl
cargo: cross
- target: aarch64-unknown-linux-musl
suffix: aarch64-linux-musl
cargo: cross
- target: armv7-unknown-linux-musleabihf
suffix: armv7-linux-musleabihf
cargo: cross
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Cross Installation
run: cargo install cross
if: ${{ matrix.cargo == 'cross' }}
- name: Build
run: |
${{ matrix.cargo }} build --release --locked --target ${{ matrix.target }}
mv target/${{ matrix.target }}/release/${{ github.event.repository.name }} ${{ github.event.repository.name }}_${{ matrix.suffix }}
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}_${{ matrix.suffix }}
path: ${{ github.event.repository.name }}_${{ matrix.suffix }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ github.event.repository.name }}_${{ matrix.suffix }}
container:
name: Container Images (${{ matrix.arch }})
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: linux/amd64
suffix: x86_64-linux-musl
short_suffix: x86_64-linux
- arch: linux/aarch64
suffix: aarch64-linux-musl
short_suffix: aarch64-linux
- arch: linux/arm/v7
suffix: armv7-linux-musleabihf
short_suffix: armv7-linux
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup qemu
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: GitHub Container Registry Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Retrieve Artifacts
uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}_${{ matrix.suffix }}
path: build/
- name: Prepare Dockerfile
run: |
mv build/${{ github.event.repository.name }}_${{ matrix.suffix }} build/${{ github.event.repository.name }}
chmod 0755 build/${{ github.event.repository.name }}
echo 'FROM scratch' > build/Dockerfile
echo 'ADD ${{ github.event.repository.name }} /${{ github.event.repository.name }}' >> build/Dockerfile
echo 'ENTRYPOINT ["/${{ github.event.repository.name }}"]' >> build/Dockerfile
- name: Docker meta
id: docker-meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=false
suffix=-${{ matrix.short_suffix }},onlatest=true
- name: Build and push
uses: docker/build-push-action@v5
with:
context: build
platforms: ${{ matrix.arch }}
push: true
tags: ${{ steps.docker-meta.outputs.tags }}
provenance: false
container_manifest:
name: Container Manifest
needs: container
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: GitHub Container Registry Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker-meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=false
- name: Create and push tag manifest
if: startsWith(github.ref, 'refs/tags/')
run: |
docker buildx imagetools create \
-t ${{ steps.docker-meta.outputs.tags }} \
${{ steps.docker-meta.outputs.tags }}-x86_64-linux \
${{ steps.docker-meta.outputs.tags }}-aarch64-linux \
${{ steps.docker-meta.outputs.tags }}-armv7-linux
- name: Create and push tag manifest (latest)
run: |
docker buildx imagetools create \
-t ghcr.io/${{ github.repository }}:latest \
${{ steps.docker-meta.outputs.tags }}-x86_64-linux \
${{ steps.docker-meta.outputs.tags }}-aarch64-linux \
${{ steps.docker-meta.outputs.tags }}-armv7-linux
ghcr_cleanup:
name: GHCR Cleanup
needs: container_manifest
runs-on: ubuntu-latest
steps:
- name: Delete all containers from repository without tags
uses: camargo/delete-untagged-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}