I am trying below code in Dockerfile but I am getting error while I build the Docker image.
ENV GITHUB_RUNNER_VERSION=''
RUN $(curl --silent "https://api.github.com/repos/actions/runner/releases/latest" | jq -r '.tag_name[1:]') >> ${GITHUB_RUNNER_VERSION}
RUN curl -Ls https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz | tar zx \
&& chown -R github:github /work \
&& sudo ./bin/installdependencies.sh
Error:
Step 10/20 : RUN curl --silent "https://api.github.com/repos/actions/runner/releases/latest" | jq -r '.tag_name[1:]' >> ${GITHUB_RUNNER_VERSION}
---> Running in a827248e3eb4
/bin/sh: 1: cannot create : Directory nonexistent
The command '/bin/sh -c curl --silent "https://api.github.com/repos/actions/runner/releases/latest" | jq -r '.tag_name[1:]' >> ${GITHUB_RUNNER_VERSION}' returned a non-zero code: 2
Error: exit status 2