diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..483a424 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,42 @@ +name: gitlab-cleanup-handler + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: Run tests + run: go test -race -coverprofile=coverage.txt ./... + + vulnerabilities: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: Check vulnerabilities + run: | + go install golang.org/x/vuln/cmd/govulncheck@latest + govulncheck ./... + + build: + needs: [test, vulnerabilities] + runs-on: ubuntu-latest + env: + BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }} + GITEA_REPOSITORY: ${{ gitea.repository }} + steps: + - uses: actions/checkout@v4 + - uses: buildtool/setup-buildtools-action@v1 + - name: Build and push + run: unset GITEA_TOKEN && build && push