Repository navigation
64 lines (58 loc) · 2.52 KB
/
Copy pathlicense-eye.yml
File metadata and controls
64 lines (58 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Apache SkyWalking Eyes
permissions:
contents: read
on:
push:
branches:
- 'main'
- '*-stable'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
license-check:
if: "github.event_name != 'push' || (!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]'))"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# This action is a composite that builds license-eye from source on every
# run, and its own cache is broken upstream: dependency/action.yml passes
# cache-dependency-path ${{ github.action_path }}/go.sum, but go.sum lives
# at the action's repository root, not in dependency/ (404 vs 200). So
# setup-go logs "Restore cache failed: Some specified paths were not
# resolved" and the module cache never restores, making each run
# re-download ~35 Go modules and re-run make. That leaves every run
# exposed to a transient proxy.golang.org error such as
# "stream error: INTERNAL_ERROR; received from peer", which fails the job
# on an otherwise healthy repository. Retry once before failing.
- name: "[Attempt 1] Check Dependencies' License"
id: licenseEyeAttempt1
uses: apache/skywalking-eyes/dependency@a196742f472feaffafea537ce5a2a4c3c53a8de4 # v0.9.0
with:
config: .licenserc.yaml
mode: "check"
# Generated from configured licenses. Compatibility check mode is used
# only when License-Eye has a usable main-license matrix; otherwise
# resolve mode records dependency licenses without false failures.
flags: "--weak-compatible"
continue-on-error: true
- name: "[Attempt 2] Check Dependencies' License"
id: licenseEyeAttempt2
if: ${{ steps.licenseEyeAttempt1.outcome == 'failure' }}
uses: apache/skywalking-eyes/dependency@a196742f472feaffafea537ce5a2a4c3c53a8de4 # v0.9.0
with:
config: .licenserc.yaml
mode: "check"
flags: "--weak-compatible"