Skip to content

Commit

Permalink
Merge pull request #96 from getlago/fix-action-3
Browse files Browse the repository at this point in the history
fix(action-pr): fixing release bot stuff
  • Loading branch information
electrosenpai authored Oct 29, 2024
2 parents dedf078 + fb18479 commit bf11097
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bf11097

Please sign in to comment.