Skip to content

Merge branch 'main' into fix/license_eye #2

Merge branch 'main' into fix/license_eye

Merge branch 'main' into fix/license_eye #2

Workflow file for this run

name: Shared Check & Fix License Header
on:
workflow_call:
inputs:
runs-on:
description: "The runner to use for the job"
required: false
default: "default"
type: string
apply_header:
description: "Apply automatically license header"
required: false
default: true
type: boolean
secrets:
github_token:

Check failure on line 17 in .github/workflows/shared-license.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/shared-license.yaml

Invalid workflow file

secret name `github_token` within `workflow_call` can not be used since it would collide with system reserved name
description: "The token to use for the job"
required: false
jobs:
build-license-eye:
name: Build LicenseEye
if: inputs.apply_header == false
runs-on: ${{ inputs.runs-on}}
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Check License Header
uses: apache/skywalking-eyes/[email protected]
with:
config: .github/licenserc.yaml
mode: fix
apply-license-header:
name: Apply LicenceHeader
if: inputs.apply_header == true
runs-on: ${{ inputs.runs-on }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.github_token != '' && secrets.github_token || secrets.GITHUB_TOKEN }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Check License Header
uses: apache/skywalking-eyes/[email protected]
with:
config: .github/licenserc.yaml
mode: fix
- name: Apply Changes
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
author_name: License Bot
author_email: [email protected]
message: 'Automatic application of license header'