-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add github action to release chart
- Loading branch information
Showing
7 changed files
with
105 additions
and
64 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
|
||
chart-release: | ||
name: chart release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: install Helm | ||
uses: azure/setup-helm@v4 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: deploy/charts/alertmanager-webhook-adapter | ||
skip_packaging: false | ||
skip_existing: false | ||
skip_upload: false | ||
mask_as_latest: false | ||
pages_branch: gh-pages | ||
packages_with_index: true | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
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 |
---|---|---|
@@ -1,31 +1,81 @@ | ||
--- | ||
# Release files to GitHub Releases | ||
|
||
name: Tagged Binary Release CI | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
tagged-release: | ||
name: Tagged Release | ||
docker-release: | ||
name: docker release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: AutoModality/action-clean@v1 | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: docker login | ||
uses: docker/[email protected] | ||
with: | ||
# registry: ${{ secrets.DOCKERHUB_ADDR }} | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
|
||
- name: prepare short tag | ||
id: prepare_short_tag | ||
run: | | ||
SHORT_TAG=`git describe --abbrev=5 --dirty --tags --always` | ||
echo "::set-output name=image_short_tag::$SHORT_TAG" | ||
echo "::notice title=Build Image Short Tag::$SHORT_TAG" | ||
- name: prepare tag | ||
id: prepare_tag | ||
run: | | ||
TIME_TAG=`TZ=Zero date +"%y%m%d%H%M%S"` | ||
COMMIT_TAG=`echo $GITHUB_SHA | cut -c 1-7` | ||
TAG="$TIME_TAG-$COMMIT_TAG" | ||
echo "::set-output name=image_tag::$TAG" | ||
echo "::notice title=Build Image Tag::$TAG" | ||
- name: build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
bougou/alertmanager-webhook-adapter:latest | ||
bougou/alertmanager-webhook-adapter:${{ steps.prepare_tag.outputs.image_tag }} | ||
bougou/alertmanager-webhook-adapter:${{ steps.prepare_short_tag.outputs.image_short_tag }} | ||
binary-release: | ||
name: binary release | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
|
||
- name: set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build & test | ||
- name: build & test | ||
run: | | ||
make dependencies | ||
make build-all | ||
- uses: marvinpinto/action-automatic-releases@latest | ||
- name: release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
apiVersion: v2 | ||
appVersion: 1.1.8 | ||
description: alertmanager webhook adapter | ||
description: helm chart for alertmanager webhook adapter | ||
name: alertmanager-webhook-adapter | ||
version: 1.0.0 | ||
version: 1.0.1 | ||
type: application | ||
maintainers: | ||
- name: bougou |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
signature: "MyIDC" | ||
image: | ||
name: bougou/alertmanager-webhook-adapter | ||
tag: v1.1.8 | ||
signature: MyIDC | ||
lang: en | ||
timezone: Asia/Shanghai |