Skip to content

Hybrid agent Message Queue Traces and Transactions #1706

Hybrid agent Message Queue Traces and Transactions

Hybrid agent Message Queue Traces and Transactions #1706

Workflow file for this run

# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: Check License Headers
on:
push:
branches:
- main
tags-ignore:
- "**"
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.ref || github.run_id }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
# Tests
addlicense:
runs-on: ubuntu-22.04
container:
image: ghcr.io/newrelic/newrelic-python-agent-ci:latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
- name: Fetch git tags
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git fetch --tags origin
- name: Check License Headers
shell: bash
run: |
# shellcheck disable=SC2046
if addlicense -f ./.github/LICENSE_HEADER -check -ignore "newrelic/packages/**/*" $(git ls-tree -r HEAD --name-only) >output.log; then
echo "All files have the correct license header."
else
echo "License header missing from the following files:"
sed s'/^/ - /' <output.log
# shellcheck disable=SC2016
echo '
To automatically add the license header to files that are missing it:
Download the addlicense binary for your architecture and add it to your $PATH
https://github.com/google/addlicense/releases
Then run the following command from the repository root directory:
addlicense -f ./.github/LICENSE_HEADER -ignore "newrelic/packages/**/*" $(git ls-tree -r HEAD --name-only)' \
| sed 's/^ *//'
exit 1
fi