diff --git a/.gitea/workflows/dockerimage.yaml b/.gitea/workflows/dockerimage.yaml index e53aa02..ffc29d0 100644 --- a/.gitea/workflows/dockerimage.yaml +++ b/.gitea/workflows/dockerimage.yaml @@ -1,5 +1,5 @@ --- -name: Docker Build +name: CI/CD on: workflow_dispatch: {} @@ -8,18 +8,53 @@ on: - main paths-ignore: - 'README.md' + - 'AUTH.md' + - 'DEPLOY.md' + - 'HOWTO_ADD_BOT.md' - 'chart/**' - '.gitignore' - 'Makefile' - 'bots.example.yaml' + - 'docker-compose.yml' + pull_request: + branches: + - main + paths-ignore: + - 'README.md' + - 'AUTH.md' + - 'DEPLOY.md' + - 'HOWTO_ADD_BOT.md' + - 'chart/**' + - '.gitignore' + - 'docker-compose.yml' concurrency: group: ${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true jobs: + test: + runs-on: ubuntu-latest + steps: + - name: git checkout + uses: actions/checkout@v4 + + - name: setup go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + cache: true + + - name: go vet + run: go vet ./... + + - name: go test (race + count=1) + run: go test -race -count=1 -timeout 120s ./... + build-and-push-image: runs-on: ubuntu-latest + needs: test + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Login to Gitea Container Registry uses: docker/login-action@v3