[DO-110] fixed Gitea Action workflow file (!24)

- Создан конфиг для Groovy линтера и workflow для Gitea action чтобы запускать этот линтер.

Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/24
Reviewed-by: Aleksandr Vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
Yaroslav Bondarenko
2024-04-26 11:06:21 +03:00
parent 120e62956f
commit 1ad918c929

View File

@@ -18,8 +18,8 @@ jobs:
container: container:
image: harbor.avroid.tech/devops/npm-groovy-lint:14.4.1-0 image: harbor.avroid.tech/devops/npm-groovy-lint:14.4.1-0
steps: steps:
- run: echo "Start job on ${{ runner.name }} with os ${{ runner.os }}" - run: echo "Start job on ${{ runner.name }} with OS ${{ runner.os }}"
- run: echo "Work with branch ${{ gitea.ref }} repository ${{ gitea.repository }}" - run: echo "Work with branch ${{ gitea.ref }} in repository ${{ gitea.repository }}"
- name: Check out repository code - name: Check out repository code
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Mirrors/github-actions-checkout.git@v4 uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Mirrors/github-actions-checkout.git@v4
with: with:
@@ -31,9 +31,16 @@ jobs:
with: with:
files: | files: |
**/*.groovy **/*.groovy
- name: Run step if any of the listed files above change **/Jenkinsfile
- name: Run step if there is no changed files
id: no_files_to_check
if: steps.changed-files-specific.outputs.any_changed != 'true'
run: echo "*** No changed groovy files, nothing to check. ***"
- name: Run linter for changed files
id: groovy_linter id: groovy_linter
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/npm-groovy-lint-docker-action.git@v7 if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/npm-groovy-lint-docker-action.git@v17
with: with:
input_flags: "--failon error" input_flags: "--failon error"
input_files: ${{ steps.changed-files-specific.outputs.all_changed_files }} input_files: ${{ steps.changed-files-specific.outputs.all_changed_files }}