diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 17 | ||||
-rw-r--r-- | .github/workflows/go.yml | 33 | ||||
-rw-r--r-- | .github/workflows/issue_reviver.yml | 4 | ||||
-rw-r--r-- | .github/workflows/labeler.yml | 3 | ||||
-rw-r--r-- | .github/workflows/stale.yml | 4 |
5 files changed, 23 insertions, 38 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e28e46352..b0381a563 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,28 +1,25 @@ +# This workflow builds the source code, extracts nogo annotations and +# posts them to GitHub, if applicable. This leverages the fact that the +# workflow token has appropriate permissions to do so, and attempts to +# leverage the GitHub workflow caches. name: "Build" -on: +"on": push: branches: - master - - feature/** pull_request: branches: - master - - feature/** + - "feature/**" jobs: default: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/.cache/bazel - key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }} - restore-keys: | - ${{ runner.os }}-bazel- - run: make - run: make build OPTIONS="--build_tag_filters nogo" TARGETS="//..." - - run: make run TARGETS="//tools/github" ARGS="-path=bazel-bin/ nogo" + - run: make run TARGETS="//tools/github" ARGS="-path=bazel-bin/ -path=bazel-out/ nogo" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ github.repository }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3a6a592d1..594dc7ffc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,12 +1,16 @@ +# This workflow generates the Go branch. Note that this does not test the Go +# branch, as this is rolled into the main continuous integration pipeline. This +# workflow simply generates and pushes the branch, as long as appropriate +# permissions are available. name: "Go" -on: +"on": push: branches: - master pull_request: branches: - master - - feature/** + - "feature/**" jobs: generate: @@ -37,30 +41,9 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v2 with: - go-version: 1.14 - - uses: actions/cache@v1 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - uses: actions/cache@v1 - with: - path: ~/.cache/bazel - key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }} - restore-keys: | - ${{ runner.os }}-bazel- - # Create gopath to merge the changes. The first execution will create - # symlinks to the cache, e.g. bazel-bin. Once the cache is setup, delete - # old gopath files that may exist from previous runs (and could contain - # files that are now deleted). Then run gopath again for good. - - run: | - make build TARGETS="//:gopath" - rm -rf bazel-bin/gopath - make build TARGETS="//:gopath" + go-version: 1.15 - run: tools/go_branch.sh - - run: git checkout go && git clean -f - - run: go build ./... + - run: git checkout go && git clean -xf . && go build ./... - if: github.event_name == 'push' run: | git remote add upstream "https://github.com/${{ github.repository }}" diff --git a/.github/workflows/issue_reviver.yml b/.github/workflows/issue_reviver.yml index c53185620..3bd883035 100644 --- a/.github/workflows/issue_reviver.yml +++ b/.github/workflows/issue_reviver.yml @@ -1,5 +1,7 @@ +# This workflow revives issues that are still referenced in the code, and may +# have been accidentally closed or marked stale. name: "Issue reviver" -on: +"on": schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index c09f7eb36..3a19065e1 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,5 +1,6 @@ +# Labeler labels incoming pull requests. name: "Labeler" -on: +"on": - pull_request jobs: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0b31fecf5..3a4aa22e2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,5 +1,7 @@ +# The stale workflow closes stale issues and pull requests, unless specific +# tags have been applied in order to keep them open. name: "Close stale issues" -on: +"on": schedule: - cron: "0 0 * * *" |