Skip to content

Commit

Permalink
Add release script to upload charts (#39)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Feb 24, 2020
1 parent 57f829a commit a2713aa
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
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"

0 comments on commit a2713aa

Please sign in to comment.