Switch to running on dind
(Docker-in-Docker supporting) runners
This commit is contained in:
parent
9f0082b1e8
commit
3b30c9281e
@ -8,29 +8,24 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
package_harmony_composer:
|
package_harmony_composer:
|
||||||
container:
|
container:
|
||||||
volumes:
|
image: hub.nationtech.io/harmony/harmony_composer:latest
|
||||||
- /run/user/1001/docker.sock:/var/run/docker.sock
|
runs-on: dind
|
||||||
image: hub.nationtech.io/harmony/harmony_composer:latest@sha256:2e200c4fba73ab33d40e7f14d9f7f8a3a3ffa69a086887c201f9eb0d51661081
|
|
||||||
runs-on: docker
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# - name: Build for Linux x86_64
|
- name: Build for Linux x86_64
|
||||||
# run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu
|
run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
# - name: Build for Linux ARM64
|
- name: Build for Windows x86_64 GNU
|
||||||
# run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu
|
run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu
|
||||||
|
|
||||||
# - name: Build for Windows x86_64 GNU
|
- uses: actions/upload-artifact@v3
|
||||||
# run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu
|
with:
|
||||||
|
name: binaries
|
||||||
# - uses: actions/upload-artifact@v3
|
path: |
|
||||||
# with:
|
target/x86_64-unknown-linux-gnu/release/harmony_composer
|
||||||
# name: binaries
|
target/x86_64-pc-windows-gnu/release/harmony_composer.exe
|
||||||
# path: |
|
|
||||||
# target/x86_64-unknown-linux-gnu/release/harmony_composer
|
|
||||||
# target/x86_64-pc-windows-gnu/release/harmony_composer.exe
|
|
||||||
|
|
||||||
- name: Setup log into hub.nationtech.io
|
- name: Setup log into hub.nationtech.io
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -39,19 +34,14 @@ jobs:
|
|||||||
username: ${{ secrets.HUB_BOT_USER }}
|
username: ${{ secrets.HUB_BOT_USER }}
|
||||||
password: ${{ secrets.HUB_BOT_PASSWORD }}
|
password: ${{ secrets.HUB_BOT_PASSWORD }}
|
||||||
|
|
||||||
# TODO: build ARM images too
|
# TODO: build ARM images and MacOS binaries (or other targets) too
|
||||||
- name: Build docker container
|
|
||||||
run: docker build . -t hub.nationtech.io/harmony/harmony_composer:latest
|
|
||||||
|
|
||||||
- name: Push docker container
|
- name: Set up Docker Buildx
|
||||||
run: docker push -a hub.nationtech.io/harmony/harmony_composer
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# - name: Set up Docker Buildx
|
- name: Build and push
|
||||||
# uses: docker/setup-buildx-action@v3
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
# - name: Build and push
|
context: .
|
||||||
# uses: docker/build-push-action@v6
|
push: true
|
||||||
# with:
|
tags: hub.nationtech.io/harmony/harmony_composer:latest
|
||||||
# context: .
|
|
||||||
# push: true
|
|
||||||
# tags: hub.nationtech.io/harmony/harmony_composer:latest
|
|
||||||
|
@ -16,15 +16,13 @@ RUN apt update
|
|||||||
RUN apt install -y nodejs
|
RUN apt install -y nodejs
|
||||||
|
|
||||||
RUN apt install -y docker.io
|
RUN apt install -y docker.io
|
||||||
# RUN apt install -y podman podman-docker
|
|
||||||
|
|
||||||
RUN rustup target add x86_64-unknown-linux-gnu
|
RUN rustup target add x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
RUN apt install -y mingw-w64
|
RUN apt install -y mingw-w64
|
||||||
RUN rustup target add x86_64-pc-windows-gnu
|
RUN rustup target add x86_64-pc-windows-gnu
|
||||||
|
|
||||||
# RUN apt install -y gcc-aarch64-linux-gnu
|
# TODO: Consider adding more supported targets
|
||||||
# RUN rustup target add aarch64-unknown-linux-gnu
|
|
||||||
|
|
||||||
COPY --from=build /app/target/release/harmony_composer .
|
COPY --from=build /app/target/release/harmony_composer .
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user