Skip to content

Commit 2c6d095

Browse files
committed
Move to gh-actions
Signed-off-by: David Karlsen <[email protected]>
1 parent 2a4dfd4 commit 2c6d095

File tree

5 files changed

+129
-225
lines changed

5 files changed

+129
-225
lines changed

.circleci/config.yml

-91
This file was deleted.

.github/workflows/ci.yaml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
pull_request:
7+
branches:
8+
- '*'
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: checkout
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: shellcheck
20+
uses: ludeeus/[email protected]
21+
22+
- name: Setup go
23+
uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.14
26+
27+
- uses: azure/setup-helm@v1
28+
with:
29+
version: v3.4.0
30+
31+
- name: Install tools
32+
run: |
33+
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
34+
chmod +x ./kubectl
35+
sudo mv ./kubectl /usr/local/bin/kubectl
36+
37+
curl -fsSLo kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64"
38+
chmod +x kind
39+
sudo mv kind /usr/local/bin/kind
40+
41+
./setup.sh
42+
43+
- name: Test
44+
run: |
45+
./e2e-kind.sh
46+
47+
- name: Lint
48+
run: |
49+
go vet -v ./...
50+
goimports -w -l .
51+
go mod tidy
52+
git diff --exit-code
53+
54+
- name: Build
55+
run: |
56+
set -o nounset
57+
set -o pipefail
58+
59+
echo "Building snapshot..."
60+
./build.sh

.github/workflows/release.yaml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: Version
7+
required: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: checkout
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: shellcheck
20+
uses: ludeeus/[email protected]
21+
22+
- name: Setup go
23+
uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.14
26+
27+
- name: Install tools
28+
run: |
29+
./setup.sh
30+
31+
- name: Lint
32+
run: |
33+
go vet -v ./...
34+
goimports -w -l .
35+
go mod tidy
36+
git diff --exit-code
37+
38+
- name: Login to registry
39+
uses: docker/login-action@v1
40+
with:
41+
registry: quay.io
42+
username: ${{ secrets.QUAY_USERNAME }}
43+
password: ${{ secrets.QUAY_PASSWORD }}
44+
45+
- name: Tag
46+
uses: mathieudutour/[email protected]
47+
with:
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
custom_tag: ${{ github.event.inputs.version }}
50+
51+
- name: Build
52+
run: |
53+
set -o nounset
54+
set -o pipefail
55+
56+
echo "Building release ${{ github.event.inputs.version }}"
57+
./build.sh --release
58+
59+
- name: Create GitHub Release
60+
uses: actions/create-release@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
tag_name: ${{ github.ref }}
65+
release_name: Release ${{ github.ref }}
66+
draft: false
67+
prerelease: false

README.md

+2-25
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/helm/chart-testing)](https://goreportcard.com/report/github.com/helm/chart-testing)
5-
[![CircleCI](https://circleci.com/gh/helm/chart-testing/tree/master.svg?style=svg)](https://circleci.com/gh/helm/chart-testing/tree/master)
5+
![ci](https://github.com/davidkarlsen/chart-testing/workflows/ci/badge.svg)
66

77
`ct` is the the tool for testing Helm charts.
88
It is meant to be used for linting and testing pull requests.
@@ -175,30 +175,7 @@ Here's a previous one for reference: https://github.com/helm/chart-testing/pull/
175175

176176
### Create Release
177177

178-
CircleCI creates releases automatically when a new tag is pushed.
179-
Tags are created using `tag.sh`.
180-
181-
```console
182-
$ ./tag.sh -h
183-
Usage: tag.sh <options>
184-
185-
Create and push a tag.
186-
187-
-h, --help Display help
188-
-d, --debug Display verbose output
189-
-r, --remote The name of the remote to push the tag to (default: upstream)
190-
-f, --force Force an existing tag to be overwritten
191-
-t, --tag The name of the tag to create
192-
-s, --skip-push Skip pushing the tag
193-
```
194-
195-
By default, the script assumes that `origin` points to your own fork and that you have a remote `upstream` that points to the upstream `chart-testing` repo.
196-
Run the script specifying the version for the new release.
197-
198-
```console
199-
./tag.sh --tag <release_version>
200-
```
201-
178+
The release workflow is [dispatched from github actions](https://github.com/helm/chart-testing/actions)
202179
Versions must start with a lower-case `v`, e. g. `v3.1.1`.
203180

204181
## Supported versions

tag.sh

-109
This file was deleted.

0 commit comments

Comments
 (0)