Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed Aug 7, 2024
1 parent 62ec424 commit ddd7ff4
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,25 @@ jobs:
path: 'lmp-manifest'
ref: pika-spark

- name: Create a new user
run: |
sudo useradd -m builder --uid 1024
echo "builder:builder" | sudo chpasswd
sudo usermod -aG sudo builder
- name: Get UID and GID of the new user and store in environment
id: ids
run: |
echo "UID=$(id -u builder)"
echo "UID=$(id -u builder)" >> $GITHUB_ENV
echo "GID=$(id -g builder)"
echo "GID=$(id -g builder)" >> $GITHUB_ENV
- name: Build Docker image
run: |
docker build -t yocto-build ./lmp-manifest
- name: Check out this repository containing build script
uses: actions/checkout@v4
path: 'yocto_ws'

- name: Create a new user and assign Yocto workspace
run: |
sudo useradd -m builder --uid 1024
echo "builder:builder" | sudo chpasswd
sudo usermod -aG sudo builder
sudo chown --recursive builder:builder ${{ github.workspace }}/yocto_ws
- name: Build Yocto image
run: |
whoami
id -u
id -g
docker run --rm \
-v ${{ github.workspace }}:/workdir \
-u ${{ env.UID }}:${{ env.GID }} \
-v ${{ github.workspace }}/yocto_ws:/workdir \
-u $(id -u builder):$(id -g builder)
yocto-build \
/bin/bash -c "cd /workdir && bash portenta-x8_build.sh"

0 comments on commit ddd7ff4

Please sign in to comment.