summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml7
-rw-r--r--.github/workflows/go.yml21
-rw-r--r--.github/workflows/issue_reviver.yml6
-rw-r--r--.github/workflows/stale.yml20
4 files changed, 49 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cf782a580..e28e46352 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,9 +3,11 @@ on:
push:
branches:
- master
+ - feature/**
pull_request:
branches:
- master
+ - feature/**
jobs:
default:
@@ -19,3 +21,8 @@ jobs:
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"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_REPOSITORY: ${{ github.repository }}
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 10c86f5cd..3a6a592d1 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -6,11 +6,19 @@ on:
pull_request:
branches:
- master
+ - feature/**
jobs:
generate:
runs-on: ubuntu-latest
steps:
+ - id: setup
+ run: |
+ if ! [[ -z "${{ secrets.GO_TOKEN }}" ]]; then
+ echo ::set-output name=has_token::true
+ else
+ echo ::set-output name=has_token::false
+ fi
- run: |
jq -nc '{"state": "pending", "context": "go tests"}' | \
curl -sL -X POST -d @- \
@@ -19,12 +27,12 @@ jobs:
"${{ github.event.pull_request.statuses_url }}"
if: github.event_name == 'pull_request'
- uses: actions/checkout@v2
- if: github.event_name == 'push'
+ if: github.event_name == 'push' && steps.setup.outputs.has_token == 'true'
with:
fetch-depth: 0
token: '${{ secrets.GO_TOKEN }}'
- uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
+ if: github.event_name == 'pull_request' || steps.setup.outputs.has_token != 'true'
with:
fetch-depth: 0
- uses: actions/setup-go@v2
@@ -42,7 +50,14 @@ jobs:
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }}
restore-keys: |
${{ runner.os }}-bazel-
- - run: make build TARGETS="//:gopath"
+ # 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"
- run: tools/go_branch.sh
- run: git checkout go && git clean -f
- run: go build ./...
diff --git a/.github/workflows/issue_reviver.yml b/.github/workflows/issue_reviver.yml
index 5e0254111..c53185620 100644
--- a/.github/workflows/issue_reviver.yml
+++ b/.github/workflows/issue_reviver.yml
@@ -4,11 +4,13 @@ on:
- cron: '0 0 * * *'
jobs:
- label:
+ issue_reviver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - run: make run TARGETS="//tools/issue_reviver"
+ if: github.repository == 'google/gvisor'
+ - run: make run TARGETS="//tools/github" ARGS="revive"
+ if: github.repository == 'google/gvisor'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 000000000..0b31fecf5
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,20 @@
+name: "Close stale issues"
+on:
+ schedule:
+ - cron: "0 0 * * *"
+
+jobs:
+ stale:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@v3
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ stale-issue-label: 'stale'
+ stale-pr-label: 'stale'
+ exempt-issue-labels: 'exported, type: bug, type: cleanup, type: enhancement, type: process, type: proposal, type: question'
+ exempt-pr-labels: 'ready to pull'
+ stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.'
+ stale-pr-message: 'This pull request is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.'
+ days-before-stale: 90
+ days-before-close: 30