From 180d10f81d9470f42fd959926447f894312779f3 Mon Sep 17 00:00:00 2001 From: Rustam Tagaev Date: Thu, 11 Apr 2024 12:34:18 +0300 Subject: [PATCH] add files for new action --- .gitea/workflows/Dockerfile | 5 +++++ .gitea/workflows/action.yml | 8 ++++++++ .gitea/workflows/check-license.yml | 22 ++++++++++++++++++++++ .gitea/workflows/entrypoint.sh | 5 +++++ 4 files changed, 40 insertions(+) create mode 100644 .gitea/workflows/Dockerfile create mode 100644 .gitea/workflows/action.yml create mode 100644 .gitea/workflows/check-license.yml create mode 100644 .gitea/workflows/entrypoint.sh diff --git a/.gitea/workflows/Dockerfile b/.gitea/workflows/Dockerfile new file mode 100644 index 0000000..e6f455c --- /dev/null +++ b/.gitea/workflows/Dockerfile @@ -0,0 +1,5 @@ +FROM harbor.avroid.tech/devops/addlicense:1.1.1 + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml new file mode 100644 index 0000000..130eabd --- /dev/null +++ b/.gitea/workflows/action.yml @@ -0,0 +1,8 @@ +name: 'Addlicense action' +description: 'Checks license and notify about missing license headers' +inputs: +outputs: +runs: + using: 'docker' + image: 'Dockerfile' + args: [] diff --git a/.gitea/workflows/check-license.yml b/.gitea/workflows/check-license.yml new file mode 100644 index 0000000..2055d84 --- /dev/null +++ b/.gitea/workflows/check-license.yml @@ -0,0 +1,22 @@ +--- +name: Check license +run-name: ${{ gitea.actor }} is start check sources +on: [push] +# on: [pull_request] + +jobs: + scan-secrets: + name: Check license + runs-on: docker + container: + image: harbor.avroid.tech/docker-hub-proxy/node:20-alpine3.19 + steps: + - run: echo "Start job on ${{ runner.name }} with os ${{ runner.os }}" + - run: echo "Work with branch ${{ gitea.ref }} repository ${{ gitea.repository }}" + - name: Check out repository code + uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Mirrors/github-actions-checkout.git@v4 + with: + fetch-depth: 0 # for work tj-actions/changed-files + persist-credentials: false # for work tj-actions/changed-files + - name: Scan for secrets + uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/gitleaks-docker-action.git@v1 diff --git a/.gitea/workflows/entrypoint.sh b/.gitea/workflows/entrypoint.sh new file mode 100644 index 0000000..0c23ab2 --- /dev/null +++ b/.gitea/workflows/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "Processing event '$GITHUB_EVENT_NAME'" + +addlicense -check .