forked from hetznercloud/hcloud-cloud-controller-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to GitHub actions (hetznercloud#32)
Switch to GitHub actions and build containers in actions
- Loading branch information
1 parent
d5aab19
commit 300132e
Showing
14 changed files
with
93 additions
and
50 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,16 @@ | ||
name: Check imports | ||
on: [push] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.12' | ||
- uses: actions/checkout@master | ||
- name: Check imports | ||
shell: bash | ||
run: | | ||
export PATH=$(go env GOPATH)/bin:$PATH | ||
go get golang.org/x/tools/cmd/goimports | ||
diff -u <(echo -n) <(goimports -d .) |
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,22 @@ | ||
name: Push latest version | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.12' | ||
- uses: actions/checkout@master | ||
- name: Publish latest tag to registry | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
docker version | ||
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" | ||
docker build -t hetznercloud/hcloud-cloud-controller-manager:latest . | ||
docker push hetznercloud/hcloud-cloud-controller-manager:latest |
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: Push latest version | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.12' | ||
- name: Set env | ||
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) | ||
- uses: actions/checkout@master | ||
- name: Publish tag to registry | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
docker version | ||
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" | ||
docker build -t hetznercloud/hcloud-cloud-controller-manager:$RELEASE_VERSION . | ||
docker push hetznercloud/hcloud-cloud-controller-manager:$RELEASE_VERSION |
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,17 @@ | ||
name: Run tests | ||
on: [push] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.12' | ||
- uses: actions/checkout@master | ||
- name: Run tests | ||
run: | | ||
docker pull lkdevelopment/hetzner-cloud-api-mock | ||
docker run -d -p 127.0.0.1:4000:8080 lkdevelopment/hetzner-cloud-api-mock | ||
docker ps -a | ||
go vet ./... | ||
go test ./... |
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
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
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
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