Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7921840604 | ||
|
|
45be4a9fd9
|
||
|
|
02ccd5b8d7 | ||
|
|
2edb7b2b82
|
||
|
|
d472a906ac | ||
|
|
0151b6faf6
|
||
|
|
713d9a922a |
@@ -5,29 +5,20 @@ on:
|
||||
|
||||
jobs:
|
||||
jwt-svid:
|
||||
runs-on: self-hosted
|
||||
container:
|
||||
volumes:
|
||||
- /run/spire/agent-sockets:/run/spire/agent-sockets:ro
|
||||
runs-on: [self-hosted, pod]
|
||||
steps:
|
||||
- name: Fetch pinned SPIRE CLI
|
||||
- name: Verify bundled SPIRE CLI
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
archive=/tmp/spire.tar.gz
|
||||
curl --fail --location --silent --show-error \
|
||||
--output "$archive" \
|
||||
https://github.com/spiffe/spire/releases/download/v1.15.3/spire-1.15.3-linux-amd64-musl.tar.gz
|
||||
printf '%s %s\n' \
|
||||
ca1a4d1155317bdd2afc7f36663828a10410c7c840e54725b90b4064b0a301c7 \
|
||||
"$archive" | sha256sum --check --status
|
||||
tar -xzf "$archive" -C /tmp spire-1.15.3/bin/spire-agent
|
||||
command -v spire-agent
|
||||
spire-agent -version
|
||||
|
||||
- name: Fetch short-lived zot JWT-SVID
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
/tmp/spire-1.15.3/bin/spire-agent api fetch jwt \
|
||||
spire-agent api fetch jwt \
|
||||
-audience zot \
|
||||
-socketPath /run/spire/agent-sockets/spire-agent.sock \
|
||||
>/dev/null
|
||||
|
||||
@@ -21,11 +21,12 @@ RUN groupadd --gid 2000 runner \
|
||||
&& useradd --uid 2000 --gid 2000 --groups docker --create-home --shell /bin/bash runner \
|
||||
&& printf 'runner ALL=(ALL) NOPASSWD:ALL\n' >/etc/sudoers.d/runner \
|
||||
&& chmod 0440 /etc/sudoers.d/runner \
|
||||
&& install -d -o 2000 -g 2000 /data
|
||||
&& install -d -o 2000 -g 2000 /data /workspace
|
||||
|
||||
COPY --from=runner /usr/local/bin/gitea-runner /usr/local/bin/gitea-runner
|
||||
COPY --from=controller /out/gitea-dynamic-runner /usr/local/bin/gitea-dynamic-runner
|
||||
COPY --from=spire /opt/spire/bin/spire-agent /opt/spire/bin/spire-agent
|
||||
RUN ln -s /opt/spire/bin/spire-agent /usr/local/bin/spire-agent
|
||||
COPY config/runner.yaml /etc/gitea-runner/config.yaml
|
||||
COPY --chmod=0755 scripts/gitea-job-started /usr/local/libexec/gitea-job-started
|
||||
COPY --chmod=0755 scripts/gitea-opensandbox-runner /usr/local/libexec/gitea-opensandbox-runner
|
||||
|
||||
@@ -42,9 +42,9 @@ if [[ -f /sys/fs/cgroup/cgroup.controllers ]]; then
|
||||
'
|
||||
fi
|
||||
|
||||
sudo sh -c 'exec nohup dockerd "$@" >/tmp/dockerd.log 2>&1' sh \
|
||||
sudo sh -c 'nohup dockerd "$@" </dev/null >/tmp/dockerd.log 2>&1 &' sh \
|
||||
--host=unix:///var/run/docker.sock \
|
||||
--storage-driver="$storage_driver" &
|
||||
--storage-driver="$storage_driver"
|
||||
printf '%s\n' 'waiting for job Docker daemon'
|
||||
for ((attempt = 0; attempt < wait_seconds; attempt++)); do
|
||||
if docker info >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user