Skip to content

Commit

Permalink
Update travis.yml for Docker Hub (#4)
Browse files Browse the repository at this point in the history
* Update `.travis.yml`

* Update `.travis.yml`

* Update `.travis.yml`

* Link Travis build status to `master` branch

* Remove `nil` assignments
  • Loading branch information
aknysh authored Feb 8, 2018
1 parent c5fbda3 commit 52cfac4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
26 changes: 19 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sudo: required
language: go
go:
- 1.9.x
Expand All @@ -8,8 +9,15 @@ addons:
- make
- curl

env:
- DOCKER_IMAGE_NAME=cloudposse/github-status-updater

services:
- docker

install:
- make init
- make travis:docker-login
- make go:deps-build
- make go:deps-dev
- make go-get
Expand All @@ -20,12 +28,16 @@ script:
- make go:lint
- make go:build-all
- ls -l release/
- make docker:build

after_success:
- make travis:docker-tag-and-push

deploy:
provider: releases
api_key: "$GITHUB_API_KEY"
file_glob: true
file: "release/*"
skip_cleanup: true
on:
tags: true
- provider: releases
api_key: "$GITHUB_API_KEY"
file_glob: true
file: "release/*"
skip_cleanup: true
on:
tags: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# github-status-updater [![Build Status](https://travis-ci.org/cloudposse/github-status-updater.svg)](https://travis-ci.org/cloudposse/github-status-updater)
# github-status-updater [![Build Status](https://travis-ci.org/cloudposse/github-status-updater.svg?branch=master)](https://travis-ci.org/cloudposse/github-status-updater)


Command line utility for updating GitHub commit statuses and enabling required status checks for pull requests.
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ func main() {

protectionRequest := &github.ProtectionRequest{}

var requiredStatusChecks *github.RequiredStatusChecks = nil
var requiredPullRequestReviews *github.PullRequestReviewsEnforcement = nil
var enforceAdmins *github.AdminEnforcement = nil
var restrictions *github.BranchRestrictions = nil
var requiredStatusChecks *github.RequiredStatusChecks
var requiredPullRequestReviews *github.PullRequestReviewsEnforcement
var enforceAdmins *github.AdminEnforcement
var restrictions *github.BranchRestrictions

if protection != nil {
requiredStatusChecks = protection.GetRequiredStatusChecks()
Expand Down

0 comments on commit 52cfac4

Please sign in to comment.