-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from getlago/fix-action-3
fix(action-pr): fixing release bot stuff
- Loading branch information
Showing
1 changed file
with
16 additions
and
3 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 |
---|---|---|
|
@@ -8,9 +8,7 @@ on: | |
|
||
jobs: | ||
release-on-merge: | ||
if: > | ||
github.event.pull_request.merged == true && | ||
contains(github.event.pull_request.labels.*.name, 'release') | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
|
@@ -23,20 +21,35 @@ jobs: | |
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Check 'release' Label | ||
id: check_release_label | ||
run: | | ||
labels=${{ toJSON(github.event.pull_request.labels) }} | ||
echo "Labels de la PR : $labels" | ||
if [[ "$labels" == *'"name":"release"'* ]]; then | ||
echo "has_release_label=true" >> $GITHUB_ENV | ||
else | ||
echo "has_release_label=false" >> $GITHUB_ENV | ||
fi | ||
- name: Lint Chart - Main chart | ||
if: env.has_release_label == 'true' | ||
run: helm lint . | ||
|
||
- name: Update Dependencies | ||
if: env.has_release_label == 'true' | ||
run: helm dependency update . | ||
|
||
- name: Run chart-releaser | ||
if: env.has_release_label == 'true' | ||
uses: helm/[email protected] | ||
with: | ||
config: cr.yaml | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Deploy to GitHub Pages | ||
if: env.has_release_label == 'true' | ||
run: | | ||
git checkout gh-pages | ||
git pull origin main --rebase --autostash | ||
|