v2.0.0 #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check and fix licence | |
on: | |
push: | |
branches: [ "master" ] | |
workflow_dispatch: # Manually run with button | |
mode: | |
type: choice | |
description: 'Licence mode' | |
required: true | |
default: 'fix' | |
options: | |
- 'check' | |
- 'fix' | |
jobs: | |
licence: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
LICENCE_MODE: ${{ github.event.inputs.mode || 'fix' }} | |
steps: | |
- uses: actions/checkout@v4 | |
name: Check out code | |
- name: License Eye Header | |
uses: apache/skywalking-eyes/[email protected] | |
with: | |
mode: ${{ env.LICENCE_MODE }} | |
# Test manually with : docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header <check|fix> | |
- name: Apply Changes | |
if: env.LICENCE_MODE == 'fix' | |
uses: EndBug/add-and-commit@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
author_name: License Bot | |
author_email: [email protected] | |
message: 'Automatic application of license header' |