-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Uncrustify bot command fix (#816) * fix uncrustify run command * test uncrustify * Revert "test uncrustify" This reverts commit f660ab435fa741f8767f8a2849829f02a92ecca6. * Fix uncrustify bot command - disable install prompt (#819) * fix uncrustify run command * test uncrustify * Revert "test uncrustify" This reverts commit f660ab435fa741f8767f8a2849829f02a92ecca6. * removing apt-get prompt while installing git * Removing deprecated set-output command from uncrustify bot run yml (#820) * fix uncrustify run command * test uncrustify * Revert "test uncrustify" This reverts commit f660ab435fa741f8767f8a2849829f02a92ecca6. * removing apt-get prompt while installing git * removing the deprecated set-output command from uncrustify bot run yml, use latest git * Update changes * Fix uncrustify --------- Co-authored-by: Tony Josi <[email protected]>
- Loading branch information
1 parent
1bc8947
commit cee2654
Showing
4 changed files
with
20 additions
and
12 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
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 |
---|---|---|
|
@@ -8,41 +8,48 @@ jobs: | |
Uncrustify: | ||
name: Run_Uncrustify | ||
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/bot run uncrustify' }} | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
container: ubuntu:18.04 | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: Install Utils | ||
run: | | ||
apt-get update && apt-get --assume-yes install software-properties-common curl jq sed | ||
add-apt-repository ppa:git-core/ppa | ||
apt-get update && apt-get --assume-yes install git | ||
git --version | ||
- name: get pullrequest url | ||
run: | | ||
echo ${{ github.event.issue.pull_request.url }} | ||
- name: get upstream repo | ||
id: upstreamrepo | ||
run: | | ||
echo "::set-output name=RemoteRepo::$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.repo.full_name' | sed 's/\"//g')" | ||
echo "RemoteRepo=$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.repo.full_name' | sed 's/\"//g')" >> $GITHUB_OUTPUT | ||
- name: get upstream branch | ||
id: upstreambranch | ||
run: | | ||
echo "::set-output name=branchname::$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.ref' | sed 's/\"//g')" | ||
echo "branchname=$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.ref' | sed 's/\"//g')" >> $GITHUB_OUTPUT | ||
- name: echo upstream repo:branch | ||
run: | | ||
echo ${{ steps.upstreamrepo.outputs.RemoteRepo }}:${{ steps.upstreambranch.outputs.branchname }} | ||
- name: Checkout upstream repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }} | ||
ref: ${{ steps.upstreambranch.outputs.branchname }} | ||
- name: Install Uncrustify | ||
run: sudo apt-get install uncrustify | ||
run: apt-get update && apt-get --assume-yes install uncrustify | ||
- name: Run Uncrustify | ||
run: | | ||
uncrustify --version | ||
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} + | ||
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} + | ||
- name: Push changes to upstream repository | ||
run: | | ||
git config --global --add safe.directory '*' | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email '[email protected]' | ||
git add -A | ||
|
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