mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Cleanup GitHub actions workflows.
Also, drop the pull_request template, since this has not proved to be helpful, and just results in a commit message the includes the list. PiperOrigin-RevId: 347636507
This commit is contained in:
committed by
gVisor bot
parent
25ebddbddf
commit
4e963c99ce
@@ -1,5 +0,0 @@
|
|||||||
* [ ] Have you followed the guidelines in [CONTRIBUTING.md](../blob/master/CONTRIBUTING.md)?
|
|
||||||
* [ ] Have you formatted and linted your code?
|
|
||||||
* [ ] Have you added relevant tests?
|
|
||||||
* [ ] Have you added appropriate Fixes & Updates references?
|
|
||||||
* [ ] If yes, please erase all these lines!
|
|
||||||
@@ -1,13 +1,18 @@
|
|||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# This workflow also generates the build badge that is referred to by
|
||||||
|
# the main README.
|
||||||
name: "Build"
|
name: "Build"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- feature/**
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- "**"
|
||||||
- feature/**
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
default:
|
default:
|
||||||
@@ -22,7 +27,7 @@ jobs:
|
|||||||
${{ runner.os }}-bazel-
|
${{ runner.os }}-bazel-
|
||||||
- run: make
|
- run: make
|
||||||
- run: make build OPTIONS="--build_tag_filters nogo" TARGETS="//..."
|
- 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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
# 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"
|
name: "Go"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- feature/**
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
@@ -19,20 +19,13 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo ::set-output name=has_token::false
|
echo ::set-output name=has_token::false
|
||||||
fi
|
fi
|
||||||
- run: |
|
|
||||||
jq -nc '{"state": "pending", "context": "go tests"}' | \
|
|
||||||
curl -sL -X POST -d @- \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
"${{ github.event.pull_request.statuses_url }}"
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
if: github.event_name == 'push' && steps.setup.outputs.has_token == 'true'
|
if: steps.setup.outputs.has_token == 'true'
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: '${{ secrets.GO_TOKEN }}'
|
token: '${{ secrets.GO_TOKEN }}'
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
if: github.event_name == 'pull_request' || steps.setup.outputs.has_token != 'true'
|
if: steps.setup.outputs.has_token != 'true'
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
@@ -50,32 +43,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }}
|
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bazel-
|
${{ runner.os }}-bazel-
|
||||||
# Create gopath to merge the changes. The first execution will create
|
- run: make go
|
||||||
# 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 ./...
|
|
||||||
- if: github.event_name == 'push'
|
|
||||||
run: |
|
run: |
|
||||||
git remote add upstream "https://github.com/${{ github.repository }}"
|
git remote add upstream "https://github.com/${{ github.repository }}"
|
||||||
git push upstream go:go
|
git push upstream go:go
|
||||||
- if: ${{ success() && github.event_name == 'pull_request' }}
|
|
||||||
run: |
|
|
||||||
jq -nc '{"state": "success", "context": "go tests"}' | \
|
|
||||||
curl -sL -X POST -d @- \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
"${{ github.event.pull_request.statuses_url }}"
|
|
||||||
- if: ${{ failure() && github.event_name == 'pull_request' }}
|
|
||||||
run: |
|
|
||||||
jq -nc '{"state": "failure", "context": "go tests"}' | \
|
|
||||||
curl -sL -X POST -d @- \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
"${{ github.event.pull_request.statuses_url }}"
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# This workflow revives issues that are still referenced in the code, and may
|
||||||
|
# have been accidentally closed or marked stale.
|
||||||
name: "Issue reviver"
|
name: "Issue reviver"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Labeler labels incoming pull requests.
|
||||||
name: "Labeler"
|
name: "Labeler"
|
||||||
on:
|
on:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# 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"
|
name: "Close stale issues"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
Reference in New Issue
Block a user