Change coveralls to use build-in GITHUB_TOKEN (#465)

* change coveralls to use build-in GITHUB_TOKEN (should work in forks)

* send GITHUB_REF as GIT_BRANCH

* add debug output

* change service to github

* remove debug output

* move COVERALLS_TOKEN to environment, remove argument
This commit is contained in:
Dmitry Verkhoturov
2019-11-05 18:13:25 -06:00
committed by Umputun
parent 4c7e454d86
commit 7536e265b2
+3 -9
View File
@@ -51,17 +51,11 @@ jobs:
- name: submit coverage
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
export GIT_TAG="${GITHUB_REF/refs\/tags\//}"
if [[ "$GIT_TAG" != "$GITHUB_REF" ]]; then
export GIT_BRANCH=$GIT_TAG
fi
export GIT_BRANCH=$GITHUB_REF
cd backend
$(go env GOPATH)/bin/goveralls -service="GitHub Action" -coverprofile=$GITHUB_WORKSPACE/profile.cov -repotoken $COVERALLS_TOKEN
$(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{secrets.COVERALLS_TOKEN}}
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build docker image
run: docker build --build-arg SKIP_BACKEND_TEST=true --build-arg CI=github .