I'm trying to build webrtc using github actions with Docker Ubuntu container. And receiving bunch of tar: ./usr/lib/i386-linux-gnu/libicui18n.so.67.1: Cannot change ownership to uid 376730, gid 89939: Invalid argument
like messages while webrtc fetch process. I'm found possible solution with --no-same-owner
tar parameter but can't figure out how to force tar to use it on every .tar file which webrtc fetch want to process.
Workflow:
name: Build
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: Linux
container: ghcr.io/<company>/<name>
...
name: ${{matrix.os}}, ${{matrix.arch}}
runs-on: [ "self-hosted", ...]
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Build WebRTC
if: ${{matrix.os == 'Linux'}}
shell: bash
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
export PATH=$(pwd)/depot_tools:$PATH
mkdir webrtc_build
cd webrtc_build
fetch --nohooks webrtc && gclient sync
...
And Dockerfile:
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y sudo clang build-essential cmake git libssl-dev curl python3 && \
...
rm -rf /var/lib/apt/lists/*
Docker publish workflow:
on:
...
jobs:
push:
runs-on: [self-hosted, ...]
steps:
- uses: actions/checkout@v2
- name: Build image
run: docker build . --file Dockerfile --tag <name> --label "runnumber=${GITHUB_RUN_ID}"
....
- name: Push image
run: |
docker tag <name> ghcr.io/<company>/<name>
docker push ghcr.io/<company>/<name>
Fixed by adding environment variable TAR_OPTIONS
:
env:
TAR_OPTIONS: --no-same-owner