Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aa15b9e

Browse filesBrowse files
author
Joan Fontanals
authored
ci: add license (#1861)
Signed-off-by: Joan Martinez <joan.fontanals.martinez@jina.ai>
1 parent caf9713 commit aa15b9e
Copy full SHA for aa15b9e

File tree

1 file changed

+51
-0
lines changed
Filter options

1 file changed

+51
-0
lines changed

‎.github/workflows/add_license.yml

Copy file name to clipboard
+51Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Add License to Python Files
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
add-license:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: 3.10
19+
20+
- name: Run add_license.sh and check for changes
21+
id: add_license
22+
run: |
23+
chmod +x scripts/add_license.sh
24+
CHANGES=$(git status --porcelain)
25+
./scripts/add_license.sh
26+
NEW_CHANGES=$(git status --porcelain)
27+
echo "::set-output name=changes::${NEW_CHANGES}"
28+
29+
- name: Commit changes if there are modifications
30+
run: |
31+
if [[ -n "${{ steps.add_license.outputs.changes }}" ]]; then
32+
git config --local user.email "dev-bot@jina.ai"
33+
git config --local user.name "Jina Dev Bot"
34+
git add .
35+
git commit -m "chore: add license to Python files"
36+
git push
37+
else
38+
echo "No changes detected, skipping commit."
39+
fi
40+
if: steps.add_license.outputs.changes != ''
41+
42+
- name: Create Pull Request
43+
uses: peter-evans/create-pull-request@v3
44+
with:
45+
title: "Add license to Python files"
46+
branch: "add-license"
47+
commit-message: "chore: add license to Python files"
48+
base: "main"
49+
labels: "auto-merge"
50+
token: ${{ secrets.JINA_DEV_BOT }}
51+
if: steps.add_license.outputs.changes != ''

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.