-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint-oas): update actions to latest version
& push action
- Loading branch information
Showing
1 changed file
with
25 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |