From 2a682955d34f809e7540bb170361ffb45f8e10b6 Mon Sep 17 00:00:00 2001 From: leeeunkoo Date: Wed, 21 May 2025 17:19:26 +0900 Subject: [PATCH] Create rust.yml --- .github/workflows/rust.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..a16052338 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,36 @@ +name: Rust + +on: + push: + branches: [ "main", "release", "debug" ] + pull_request: + branches: [ "refactoring" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: self-hosted + + container: + image: rust:latest + steps: + - name: Install build env + run: | + apt-get update && apt-get install -y libdbus-1-dev git-all make gcc docker.io protobuf-compiler build-essential pkg-config curl libssl-dev + - uses: actions/checkout@v4 + - run: cargo build --manifest-path=src/Cargo.toml + - uses: docker/login-action@v1 + with: + registry: sdv.lge.com + username: admin + password: ${{ secrets.HARBOR_PASSWORD }} + - run: | + git config --global --add safe.directory /__w/PICCOLO/PICCOLO + git_hash=$(git rev-parse --short "$GITHUB_SHA") + git_branch=${GITHUB_REF#refs/heads/} + docker build -t sdv.lge.com/demo/${git_branch}/piccolo:${git_hash} -f containers/Dockerfile . + docker push sdv.lge.com/demo/${git_branch}/piccolo:${git_hash} +