Update license-header.yml #20
This file contains hidden or 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: Add License Headers | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| license: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' | |
| - name: Install addlicense | |
| run: | | |
| go install github.com/google/addlicense@latest | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Add license headers | |
| run: addlicense -v -c "Qubership" -l apache -ignore ./.github/** -ignore ./* . | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7.0.8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: add license headers to source files" | |
| title: "chre: add license headers to source files" | |
| body: "This PR adds Apache license headers to all applicable source files." | |
| branch: add-license-headers | |
| base: main |