Skip to content

Commit

Permalink
chore(lint-oas): update actions to latest version
Browse files Browse the repository at this point in the history
& push action
  • Loading branch information
MelvLee committed Jun 27, 2022
1 parent 4b1275b commit a7ede14
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/lint-oas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12'
node-version: '16'
- name: Install dependencies
run: npm ci
- name: lint OAS
Expand All @@ -28,11 +28,27 @@ jobs:
run: npm run oas:lint-genereervariant
- name: push resolved to remote
run: |
doCommit=false
if [ -n "$(git status specificatie/genereervariant/openapi.yaml --porcelain)" ]; then
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add specificatie/genereervariant/openapi.*
git commit -m "commit resolve artifacts"
git pull --ff
git push
echo "specificatie/genereervariant/openapi.yaml modified"
git add specificatie/genereervariant/openapi.*
doCommit=true
fi
if [ -n "$(git status specificatie/gba-genereervariant/openapi.yaml --porcelain)" ]; then
echo "specificatie/gba-genereervariant/openapi.yaml modified"
git add specificatie/gba-genereervariant/openapi.*
doCommit=true
fi
if [ $doCommit = true ]; then
echo "commit resolve artifacts"
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git pull --ff-only
git commit -m "commit resolve artifacts"
git push
else
echo "no commit"
fi

0 comments on commit a7ede14

Please sign in to comment.