Update pull request workflow for license checks
This commit is contained in:
10
.github/workflows/pull_request.yml
vendored
10
.github/workflows/pull_request.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Escape dollar signs in licenses
|
- name: Escape dollar signs in licenses
|
||||||
run: |
|
run: |
|
||||||
sed -i 's/\$/\\$/g' lib/presentation/views/about/licenses/oss_licenses.dart
|
sed -i 's/\$/\\$/g' lib/presentation/views/about/licenses/oss_licenses.dart
|
||||||
|
|
||||||
- name: Check for changes
|
- name: Check for changes
|
||||||
id: check_changes
|
id: check_changes
|
||||||
run: |
|
run: |
|
||||||
@@ -35,11 +35,12 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo "changes_detected=false" >> $GITHUB_OUTPUT
|
echo "changes_detected=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Checkout PR branch
|
- name: Checkout PR branch
|
||||||
if: steps.check_changes.outputs.changes_detected == 'true'
|
if: steps.check_changes.outputs.changes_detected == 'true'
|
||||||
run: |
|
run: |
|
||||||
git checkout ${{ github.head_ref }}
|
git fetch origin pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }}
|
||||||
|
git checkout ${{ github.event.pull_request.head.ref }}
|
||||||
|
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
if: steps.check_changes.outputs.changes_detected == 'true'
|
if: steps.check_changes.outputs.changes_detected == 'true'
|
||||||
@@ -48,8 +49,7 @@ jobs:
|
|||||||
git config --global user.email "actions@github.com"
|
git config --global user.email "actions@github.com"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Actions: Licenses updated [skip ci]"
|
git commit -m "Actions: Licenses updated [skip ci]"
|
||||||
git push
|
git push origin HEAD:${{ github.event.pull_request.head.ref }}
|
||||||
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user