Perps Companion Docker Image #174
This file contains 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
name: Perps Companion Docker Image | |
on: | |
workflow_dispatch: | |
schedule: | |
# For cache, run at 9 AM UTC every 5th day of month | |
- cron: "0 9 */5 * *" | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUST_BACKTRACE: short | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
companion-image: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ci-companion-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected],[email protected] | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.81.0 | |
components: rustfmt, clippy | |
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v1-rust" | |
workspaces: | | |
. | |
- name: Dependencies | |
run: | | |
sudo apt install musl-tools qemu-user-static binfmt-support -y | |
- name: Build companion binary | |
run: just cargo-companion-release-arm | |
- name: Build image | |
run: just build-companion-image | |
- name: Push image | |
run: just push-companion-image | |
if: ${{ github.event_name != 'schedule' }} |