forked from operator-framework/helm-operator-plugins
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Travis CI to Github Actions
- Loading branch information
1 parent
82670d1
commit 997696e
Showing
4 changed files
with
85 additions
and
15 deletions.
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,80 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.13 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache go module cache | ||
id: cache-go-mod | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get dependencies | ||
run: go mod download | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v1 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.27 | ||
|
||
- name: Test | ||
run: make test | ||
|
||
- uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: cover.out | ||
|
||
deploy: | ||
name: Deploy | ||
needs: test | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Push helm-operator image to Quay | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
registry: quay.io | ||
repository: joelanford/helm-operator | ||
tags: master | ||
|
||
- name: Push example nginx-operator image to Quay | ||
uses: docker/build-push-action@v1 | ||
with: | ||
path: example/ | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
registry: quay.io | ||
repository: joelanford/nginx-operator | ||
tags: latest |
This file was deleted.
Oops, something went wrong.
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
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