-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release script to upload charts (#39)
Signed-off-by: Tamal Saha <[email protected]>
- Loading branch information
Showing
1 changed file
with
47 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,47 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*' | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Clone charts repository | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
run: | | ||
cd $HOME | ||
git clone https://1gtm:${GITHUB_TOKEN}@github.com/appscode/charts.git | ||
cd charts | ||
git config user.name "1gtm" | ||
git config user.email "[email protected]" | ||
- name: Package | ||
run: | | ||
echo "install helm 3" | ||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | ||
echo "package chart" | ||
helm package charts/stash | ||
mv stash-*.tgz $HOME/charts/stable/stash | ||
- name: Create pull request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
run: | | ||
export PR_BRANCH=${GITHUB_REPOSITORY}/${GITHUB_RUN_ID} | ||
echo $PR_BRANCH | ||
cd $HOME/charts | ||
git checkout -b $PR_BRANCH | ||
git commit -a -s -m "Push stash chart for $GITHUB_REF" | ||
git push origin $PR_BRANCH -f | ||
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 | ||
bin/hub pull-request -m "Push stash chart for $GITHUB_REF" |