Skip to content

chore: prepare for release #176

chore: prepare for release

chore: prepare for release #176

---
name: Build main - debug docker image for Github Container registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**/*.rs"
- "**/*.toml"
- ".github/workflows/build-main-debug-docker-container.yaml"
permissions:
id-token: write
contents: read
packages: write
jobs:
dockerpublish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile default
rustup show
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "rust-v0-gnu"
- name: Install cross (cross compile)
run: |
cargo install cross
- name: Build release for x86_64
run: |
cargo build --release --target=x86_64-unknown-linux-gnu
- name: Build release for aarch64
run: |
cross build --release --target=aarch64-unknown-linux-gnu
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta configuration (set image and tag)
uses: docker/metadata-action@v5
id: meta
with:
images: |
ghcr.io/unleash/unleash-edge-debug
tags: |
type=edge
- name: Login to Github Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build tag and push images
uses: docker/build-push-action@v6
with:
file: Dockerfile.debug
context: .
platforms: linux/arm64,linux/amd64
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max