-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ricoberger/github-actions
Add GitHub Actions
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 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,24 @@ | ||
name: Docker | ||
on: [release] | ||
jobs: | ||
build-release: | ||
name: Release Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.12 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.12 | ||
id: go | ||
|
||
- name: Set up Operator SDK v0.10.0 | ||
run: curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/v0.10.0/operator-sdk-v0.10.0-x86_64-linux-gnu && sudo install -m 755 operator-sdk-v0.10.0-x86_64-linux-gnu /usr/local/bin/operator-sdk | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Login to Docker | ||
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Release | ||
run: make release |
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,27 @@ | ||
name: Go | ||
on: [pull_request] | ||
jobs: | ||
build-release: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.12 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.12 | ||
id: go | ||
|
||
- name: Set up Operator SDK v0.10.0 | ||
run: curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/v0.10.0/operator-sdk-v0.10.0-x86_64-linux-gnu && sudo install -m 755 operator-sdk-v0.10.0-x86_64-linux-gnu /usr/local/bin/operator-sdk | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Get dependencies | ||
run: go mod download | ||
|
||
- name: Test | ||
run: go test ./... | ||
|
||
- name: Build | ||
run: make build |
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,33 @@ | ||
name: Helm | ||
on: [release] | ||
jobs: | ||
build-release: | ||
name: Release Helm Chart | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.12 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.12 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Configure git | ||
run: git config --global user.email "[email protected]" && git config --global user.name "ricoberger" | ||
|
||
- name: Package Helm chart | ||
run: helm init --client-only && helm package ./charts/vault-secrets-operator | ||
|
||
- name: Clone Helm repository | ||
run: git clone https://github.com/ricoberger/helm-charts.git | ||
|
||
- name: Update Helm repository | ||
run: mv vault-secrets-operator* ./helm-charts/ && helm repo index helm-charts/ --url https://ricoberger.github.io/helm-charts/ | ||
|
||
- name: Commit changes | ||
run: cd helm-charts/ && git add . && git commit -m "Add new release for Vault Secrets Operator" | ||
|
||
- name: Push changes | ||
run: cd helm-charts/ && git push https://ricoberger:${{ secrets.TOKEN }}@github.com/ricoberger/helm-charts.git |