fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

1on: 2 push: 3 branches: 4 - main 5 pull_request: 6name: CI 7jobs: 8 test: 9 runs-on: ubuntu-latest 10 container: alpine:edge # go1.19 needs > alpine 3.15 11 steps: 12 - name: checkout 13 uses: actions/checkout@v3 14 - name: add dependencies 15 run: apk add go git 16 - name: install ctags 17 run: ./install-ctags-alpine.sh 18 - name: test 19 run: go test ./... 20 21 shellcheck: 22 name: shellcheck 23 runs-on: ubuntu-latest 24 steps: 25 - uses: actions/checkout@v3 26 - name: Run ShellCheck 27 uses: ludeeus/action-shellcheck@1.1.0 28 29 shfmt: 30 name: shfmt 31 runs-on: ubuntu-latest 32 steps: 33 - uses: actions/checkout@v3 34 - uses: reviewdog/action-shfmt@v1.0.2 35 with: 36 filter_mode: "nofilter" 37 fail_on_error: "true" 38 shfmt_flags: "-i 2 -ci -bn" 39 40 lint-protos: 41 name: "buf lint" 42 runs-on: ubuntu-latest 43 steps: 44 # Run `git checkout` 45 - uses: actions/checkout@v2 46 # Install the `buf` CLI 47 - uses: bufbuild/buf-setup-action@v1 48 with: 49 github_token: ${{ secrets.GH_TOKEN }} 50 # Lint your Protobuf sources 51 - run: .github/workflows/buf-lint-check.sh 52 53 format-protos: 54 name: "buf format" 55 runs-on: ubuntu-latest 56 steps: 57 # Run `git checkout` 58 - uses: actions/checkout@v2 59 # Install the `buf` CLI 60 - uses: bufbuild/buf-setup-action@v1 61 with: 62 github_token: ${{ secrets.GH_TOKEN }} 63 # Check to see if the Protobuf sources are formatted 64 - run: .github/workflows/buf-format-check.sh 65 66 generate-protos: 67 name: "buf generate" 68 runs-on: ubuntu-latest 69 steps: 70 # Run `git checkout` 71 - uses: actions/checkout@v2 72 # Install the `buf` CLI 73 - uses: bufbuild/buf-setup-action@v1 74 with: 75 github_token: ${{ secrets.GH_TOKEN }} 76 # Check if the generated code is up-to-date 77 - run: .github/workflows/buf-generate-check.sh 78 79 # We build a shared docker image called "zoekt". This is not pushed, but is 80 # used for creating the indexserver and webserver images. 81 docker: 82 if: github.ref == 'refs/heads/main' 83 runs-on: ubuntu-latest 84 needs: 85 - "test" 86 - "shellcheck" 87 steps: 88 - name: checkout 89 uses: actions/checkout@v3 90 91 - name: version 92 id: version 93 run: .github/workflows/docker-version.sh 94 95 - name: docker-meta-webserver 96 id: meta-webserver 97 uses: docker/metadata-action@v3 98 with: 99 images: | 100 sourcegraph/zoekt-webserver 101 tags: | 102 type=ref,event=branch 103 type=ref,event=pr 104 type=semver,pattern={{version}} 105 type=sha 106 - name: docker-meta-indexserver 107 id: meta-indexserver 108 uses: docker/metadata-action@v3 109 with: 110 images: | 111 sourcegraph/zoekt-indexserver 112 tags: | 113 type=ref,event=branch 114 type=ref,event=pr 115 type=semver,pattern={{version}} 116 type=sha 117 118 - name: build-zoekt 119 uses: docker/build-push-action@v4 120 with: 121 context: . 122 tags: "zoekt:latest" 123 push: "false" 124 build-args: VERSION=${{ steps.version.outputs.value }} 125 126 - name: Login to Docker Hub 127 uses: docker/login-action@v2 128 with: 129 username: ${{ secrets.DOCKERHUB_USERNAME }} 130 password: ${{ secrets.DOCKERHUB_TOKEN }} 131 132 - name: build-push-webserver 133 uses: docker/build-push-action@v4 134 with: 135 context: . 136 tags: sourcegraph/zoekt-webserver:${{ steps.version.outputs.value }}, ${{ steps.meta-webserver.outputs.tags }}, sourcegraph/zoekt-webserver:latest 137 file: Dockerfile.webserver 138 cache-from: sourcegraph/zoekt-webserver:latest 139 push: true 140 141 - name: build-push-indexserver 142 uses: docker/build-push-action@v4 143 with: 144 context: . 145 tags: sourcegraph/zoekt-indexserver:${{ steps.version.outputs.value }}, ${{ steps.meta-indexserver.outputs.tags }}, sourcegraph/zoekt-indexserver:latest 146 file: Dockerfile.indexserver 147 cache-from: sourcegraph/zoekt-indexserver:latest 148 push: true