-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #179: Migration of current travis ci to github-actions ci. #244
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ac7aeee
Migration of current travis ci to github-actions ci.
ameydev 3673017
Added helm init --client-only flag
ameydev 69c3014
Replaced docker image repo from ameydev to infracloud.
ameydev 33fa456
reverted the helm app version.
ameydev 377d6e5
fixed formatting:Removed extra spaces.
ameydev 581b072
Merge branch 'develop' into github-actions-impl
PrasadG193 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
GOPATH: /home/runner/work/botkube | ||
GOBIN: /home/runner/work/botkube/bin | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
- name: install golint | ||
run: | | ||
go get -u golang.org/x/lint/golint | ||
- name: Before build | ||
run: | | ||
echo Workflow trigger - ${{ github.event_name }} | ||
./hack/verify-gofmt.sh | ||
./hack/verify-govet.sh | ||
./hack/verify-golint.sh | ||
go mod verify | ||
- name: make test, make build, make docker-image | ||
run: | | ||
make test | ||
make | ||
make container-image | ||
- name: Push docker images | ||
if: success() && github.event_name == 'push' && endsWith(github.ref ,'develop') | ||
run: | | ||
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker push infracloudio/botkube:latest | ||
- name: Install helm | ||
if: success() && github.event_name == 'push' && endsWith(github.ref ,'develop') | ||
run: | | ||
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh | ||
chmod +x get_helm.sh | ||
./get_helm.sh | ||
helm lint helm/botkube | ||
- name: Release Helm template | ||
if: success() && github.event_name == 'push' && endsWith(github.ref ,'develop') | ||
run: | | ||
cd .. | ||
git config --global user.email "botkube-ci@infracloud.io" | ||
git config --global user.name "BotKube CI" | ||
git clone https://github.com/infracloudio/charts.git | ||
cd charts | ||
git fetch | ||
git branch | ||
git pull origin gh-pages | ||
helm init --client-only | ||
helm package --app-version v9.99.9-dev --version v9.99.9-dev ${{ github.workspace }}/helm/botkube/ | ||
helm repo index --url https://infracloudio.github.io/charts --merge index.yaml . | ||
git add . | ||
git commit -m "Update BotKube latest helm chart" | ||
git push https://${{ secrets.GH_TOKEN }}@github.com/infracloudio/charts.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is $HOME value? Can we use $HOME to set the path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value for $HOME is /home/runner but it gives error if we try to assign value of GOPATH to a relative path.
Check error.
so I think we need to give absolute path which would be
/home/runner
or can keep the same value.