Skip to content

Commit

Permalink
chore(docker): publish docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Feb 4, 2024
1 parent 3e446f0 commit a02f7fb
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Docker Image

on:
push:

concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

env:
IMAGE_NAME: commune
GHCR_REGISTRY: ghcr.io/commune-os

jobs:
publish_image:
name: Publish image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-musl

- name: Install Just
uses: extractions/setup-just@v1

- name: Build Server
run: just build_server
9 changes: 9 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,12 @@ clear: stop
# Runs all the tests from the `test` package. Optionally runs a single one if name pattern is provided
e2e *args='':
cargo test --package test -- --nocapture --test-threads=1 $1

# Builds the Server binary used in the Docker Image
build_server:
cargo build --release -p server --target x86_64-unknown-linux-musl
ls ./target/x86_64-unknown-linux-musl/release

# Builds the Docker image for the backend
build_image *args='latest': build_server
docker build -t "commune:$1-aarch64-unknown-linux-musl" .

0 comments on commit a02f7fb

Please sign in to comment.