From 6b50b3649ac46a1b2ab102758e1db1799e2a9665 Mon Sep 17 00:00:00 2001 From: tyranron Date: Thu, 7 Nov 2019 16:09:36 +0200 Subject: [PATCH] Integrate GitHub actions for auto-releasing 'medea-demo' Helm chart --- .../release-medea-demo-helm-chart.yml | 28 +++++++++++++++++++ Makefile | 4 +-- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release-medea-demo-helm-chart.yml diff --git a/.github/workflows/release-medea-demo-helm-chart.yml b/.github/workflows/release-medea-demo-helm-chart.yml new file mode 100644 index 000000000..6cab9699c --- /dev/null +++ b/.github/workflows/release-medea-demo-helm-chart.yml @@ -0,0 +1,28 @@ +name: Release 'medea-demo' Helm chart + +on: + push: + branches: ["master"] + paths: + - jason/demo/chart/medea-demo/Chart.yaml + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.ref }} + # Required due to not working with out-of-the-box GITHUB_TOKEN: + # https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869 + token: ${{ secrets.GH_ACCESS_TOKEN }} + + - name: Prepare environment + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Actions" + + make helm.init client-only=yes + + - run: make helm.package.release chart=medea-demo build=yes diff --git a/Makefile b/Makefile index 63c699ae4..77bee4dc5 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,6 @@ RUST_BETA_VER := 1.39-beta.5 CHROME_VERSION := 77.0 FIREFOX_VERSION := 69.0 -CURRENT_GIT_BRANCH := $(strip $(shell git branch | grep \* | cut -d ' ' -f2)) - crate-dir = . ifeq ($(crate),medea-jason) crate-dir = jason @@ -819,7 +817,7 @@ endif git commit -m \ "Release $(helm-chart)-$(helm-package-release-ver) Helm chart" ; \ fi - git checkout $(CURRENT_GIT_BRANCH) + git checkout - git push origin gh-pages