ci: make the advisory license check work on the egress-free runner
The hardened runner's job network has no internet access, so `apk add` and downloading addlicense from GitHub cannot work. git, curl, jq and addlicense are baked into the runner's job image (infra/gitea-runner/ci-tools.Dockerfile).
This commit is contained in:
@@ -33,16 +33,10 @@ jobs:
|
|||||||
name: addlicense
|
name: addlicense
|
||||||
runs-on: alpine-latest
|
runs-on: alpine-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Prerequisites
|
# git, curl, jq and addlicense are baked into the runner's job image
|
||||||
run: apk add --no-cache git curl ca-certificates jq
|
# (infra/gitea-runner/ci-tools.Dockerfile in the root repo). The job
|
||||||
|
# network has no egress, so `apk add` and downloading addlicense from
|
||||||
- name: Install addlicense
|
# the internet cannot work here.
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
curl -fsSL -o /tmp/addlicense.tgz \
|
|
||||||
https://github.com/google/addlicense/releases/download/v1.2.0/addlicense_v1.2.0_Linux_x86_64.tar.gz
|
|
||||||
tar -xzf /tmp/addlicense.tgz -C /tmp
|
|
||||||
install -m 0755 /tmp/addlicense /usr/local/bin/addlicense
|
|
||||||
|
|
||||||
- name: Check added files for an AGPL header
|
- name: Check added files for an AGPL header
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user