diff --git a/.github/workflows/licenses-go.yml b/.github/workflows/licenses-go.yml new file mode 100644 index 00000000..5c733f81 --- /dev/null +++ b/.github/workflows/licenses-go.yml @@ -0,0 +1,33 @@ +name: Licenses Go + +on: + workflow_dispatch: + push: + branches: [master, develop] + paths: ['web/documentserver-example/go/**'] + pull_request: + branches: [master, develop] + paths: ['web/documentserver-example/go/**'] + +jobs: + licences: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Submodule Update + run: | + cd ${{ github.workspace }} + cwd=$(pwd) + git submodule update --init --recursive + - name: Get Repository License + id: license + run: | + license="${{ (github.event.repository.license.spdx_id) || (github.event.repository.licenses[0]) }}" + echo "License detected: $license" + echo "license=$license" >> $GITHUB_OUTPUT + - name: Check Licenses + uses: ONLYOFFICE/check-licenses@v1 + with: + project_license: ${{ steps.license.outputs.license }} + working_directory: ./web/documentserver-example/go