-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mackjmr/refactor-is-enabled-otlp
- Loading branch information
Showing
223 changed files
with
6,053 additions
and
1,765 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Update OTel Collector Dependencies and Generate OTel Agent | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * 3' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-and-generate: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Set date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: '3.12.6' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run update task | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: inv -e collector.update | ||
|
||
- name: Run generate task | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: inv -e collector.generate | ||
|
||
- name: Check for changes | ||
id: check_changes | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
if git diff-index --quiet HEAD; then | ||
echo "No changes detected" | ||
echo "changes_detected=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "Changes detected" | ||
echo "changes_detected=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Commit changes | ||
if: steps.check_changes.outputs.changes_detected == 'true' | ||
run: | | ||
git switch -c update-otel-collector-dependencies-${{ steps.date.outputs.date }} | ||
git commit -m "Update OTel Collector dependencies and generate OTel Agent" | ||
git push -u origin update-otel-collector-dependencies-${{ steps.date.outputs.date }} | ||
- name: Install GitHub CLI | ||
if: steps.check_changes.outputs.changes_detected == 'true' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install gh | ||
- name: Create draft pull request | ||
if: steps.check_changes.outputs.changes_detected == 'true' | ||
run: | | ||
gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }} | ||
gh pr create --title "Update OTel collector dependencies" --body "This PR updates the OTel Collector dependencies to the latest version. Please ensure that all tests pass before marking ready for review." --base main --head update-otel-collector-dependencies-${{ steps.date.outputs.date }} --draft |
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
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
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
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
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
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
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
Oops, something went wrong.