Skip to content

Commit

Permalink
Merge pull request #1 from ricoberger/github-actions
Browse files Browse the repository at this point in the history
Add GitHub Actions
  • Loading branch information
ricoberger authored Aug 28, 2019
2 parents 096b430 + 44b9a77 commit 2d497ec
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docker.yaml
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
27 changes: 27 additions & 0 deletions .github/workflows/go.yaml
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
33 changes: 33 additions & 0 deletions .github/workflows/helm.yaml
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

0 comments on commit 2d497ec

Please sign in to comment.