Skip to content

Merge pull request #444 from stlankes/tokio #434

Merge pull request #444 from stlankes/tokio

Merge pull request #444 from stlankes/tokio #434

Workflow file for this run

name: Publish container image
on:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
publish_image:
name: Publish container image
runs-on: ubuntu-latest
steps:
- name: Install NASM
run: |
sudo apt-get update
sudo apt-get install nasm
- uses: actions/checkout@v3
with:
submodules: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: hermitcore
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build demo
run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit --no-default-features -p rusty_demo --release
- name: Copy demo out of target dir
run: cp target/x86_64-unknown-hermit/release/rusty_demo .
- name: Download loader
uses: dsaltares/[email protected]
with:
repo: hermitcore/rusty-loader
file: rusty-loader-x86_64
- name: Create dockerfile
run: |
cat << END > Dockerfile
FROM scratch
COPY rusty-loader-x86_64 hermit/rusty-loader
COPY rusty_demo hermit/rusty_demo
CMD ["/hermit/rusty_demo"]
END
- name: Build and push container
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/hermitcore/rusty_demo:latest