mirror of
https://github.com/FreeRTOS/Lab-Project-FreeRTOS-FAT.git
synced 2025-10-19 02:23:15 +08:00
Fix Uncrustify bot command (#46)
* 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 <tonyjosi@amazon.com>
This commit is contained in:
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -13,10 +13,11 @@ jobs:
|
|||||||
|
|
||||||
formatting:
|
formatting:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
container: ubuntu:18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install Uncrustify
|
- name: Install Uncrustify
|
||||||
run: sudo apt-get install uncrustify=0.69.0+dfsg1-1build1
|
run: apt-get update && apt-get install uncrustify
|
||||||
- name: Run Uncrustify
|
- name: Run Uncrustify
|
||||||
run: |
|
run: |
|
||||||
uncrustify --version
|
uncrustify --version
|
||||||
|
19
.github/workflows/uncrustify.yml
vendored
19
.github/workflows/uncrustify.yml
vendored
@@ -8,34 +8,40 @@ jobs:
|
|||||||
Uncrustify:
|
Uncrustify:
|
||||||
name: Run_Uncrustify
|
name: Run_Uncrustify
|
||||||
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/bot 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:
|
steps:
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: echo "$GITHUB_CONTEXT"
|
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
|
- name: get pullrequest url
|
||||||
run: |
|
run: |
|
||||||
echo ${{ github.event.issue.pull_request.url }}
|
echo ${{ github.event.issue.pull_request.url }}
|
||||||
- name: get upstream repo
|
- name: get upstream repo
|
||||||
id: upstreamrepo
|
id: upstreamrepo
|
||||||
run: |
|
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
|
- name: get upstream branch
|
||||||
id: upstreambranch
|
id: upstreambranch
|
||||||
run: |
|
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
|
- name: echo upstream repo:branch
|
||||||
run: |
|
run: |
|
||||||
echo ${{ steps.upstreamrepo.outputs.RemoteRepo }}:${{ steps.upstreambranch.outputs.branchname }}
|
echo ${{ steps.upstreamrepo.outputs.RemoteRepo }}:${{ steps.upstreambranch.outputs.branchname }}
|
||||||
- name: Checkout upstream repo
|
- name: Checkout upstream repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.PAT }}
|
|
||||||
repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }}
|
repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }}
|
||||||
ref: ${{ steps.upstreambranch.outputs.branchname }}
|
ref: ${{ steps.upstreambranch.outputs.branchname }}
|
||||||
- name: Install Uncrustify
|
- name: Install Uncrustify
|
||||||
run: sudo apt-get install uncrustify
|
run: apt-get update && apt-get --assume-yes install uncrustify
|
||||||
- name: Run Uncrustify
|
- name: Run Uncrustify
|
||||||
run: |
|
run: |
|
||||||
uncrustify --version
|
uncrustify --version
|
||||||
@@ -43,6 +49,7 @@ jobs:
|
|||||||
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
|
- name: Push changes to upstream repository
|
||||||
run: |
|
run: |
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
git config --global user.name 'GitHub Action'
|
git config --global user.name 'GitHub Action'
|
||||||
git config --global user.email 'action@github.com'
|
git config --global user.email 'action@github.com'
|
||||||
git add -A
|
git add -A
|
||||||
|
0
ff_ioman.c
Executable file → Normal file
0
ff_ioman.c
Executable file → Normal file
Reference in New Issue
Block a user