-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e446f0
commit fb06e25
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
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@stable | ||
with: | ||
toolchain: stable | ||
targets: x86_64-unknown-linux-musl | ||
|
||
- name: Setup Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Setup Rust Target | ||
run: rustup target add x86_64-unknown-linux-musl | ||
|
||
- name: Install Build Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
build-essential \ | ||
librust-openssl-dev \ | ||
pkg-config \ | ||
openssl \ | ||
libssl-dev | ||
- name: Setup Zig | ||
uses: goto-bus-stop/[email protected] | ||
|
||
- name: Install ZigBuild | ||
run: cargo install cargo-zigbuild | ||
|
||
- name: Install Just | ||
uses: extractions/setup-just@v1 | ||
|
||
- name: Build Image | ||
run: just docker_build_image |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM arm64v8/alpine:3 | ||
|
||
COPY server /opt/commune | ||
|
||
WORKDIR app | ||
|
||
ENTRYPOINT ["/opt/commune"] |
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
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