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
|
||||
runs-on: alpine-latest
|
||||
steps:
|
||||
- name: Prerequisites
|
||||
run: apk add --no-cache git curl ca-certificates jq
|
||||
|
||||
- name: Install addlicense
|
||||
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
|
||||
# git, curl, jq and addlicense are baked into the runner's job image
|
||||
# (infra/gitea-runner/ci-tools.Dockerfile in the root repo). The job
|
||||
# network has no egress, so `apk add` and downloading addlicense from
|
||||
# the internet cannot work here.
|
||||
|
||||
- name: Check added files for an AGPL header
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user