From 4102d34a6264d55f347886954323293fc50d3375 Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Tue, 4 Apr 2023 05:11:50 +0000 Subject: [PATCH] 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 --- .github/workflows/uncrustify.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/uncrustify.yml b/.github/workflows/uncrustify.yml index af09e802a..be550aa0a 100644 --- a/.github/workflows/uncrustify.yml +++ b/.github/workflows/uncrustify.yml @@ -15,17 +15,23 @@ jobs: 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 }} @@ -34,14 +40,15 @@ jobs: with: repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }} ref: ${{ steps.upstreambranch.outputs.branchname }} - - name: Install Uncrustify and Git - run: apt-get update && apt-get --assume-yes install uncrustify git + - name: 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 {} + - 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 'action@github.com' git add -A