diff --git a/.github/workflows/creating_pr.yml b/.github/workflows/creating_pr.yml deleted file mode 100644 index 1b88b2f..0000000 --- a/.github/workflows/creating_pr.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Prepare Release PR - -on: - workflow_dispatch: - inputs: - tag: - description: 'Tag to release' - required: true - -jobs: - create-release-pr: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - - - name: Update Chart and Values Versions - run: | - sed -i "s/^version:.*/version: ${{ github.event.inputs.tag }}/" Chart.yaml - sed -i "s/^appVersion:.*/appVersion: '${{ github.event.inputs.tag }}'/" Chart.yaml - sed -i "s/^version:.*/version: ${{ github.event.inputs.tag }}/" values.yaml - - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 - with: - commit-message: "chore(release): update to ${{ github.event.inputs.tag }}" - branch: release/${{ github.event.inputs.tag }} - base: main - title: "Release ${{ github.event.inputs.tag }}" - body: "This PR updates the chart versions to ${{ github.event.inputs.tag }}." - labels: release - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - update-existing-pr: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index eadaa4a..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Release Charts on Merge - -on: - pull_request: - types: [closed] - branches: - - main - -jobs: - release-on-merge: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Checkout 'gh-pages' branch - uses: actions/checkout@v4 - with: - ref: gh-pages - fetch-depth: 0 - persist-credentials: true - - - name: Configure Git - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git merge origin/main --no-edit - - - name: Installer jq - run: sudo apt-get install jq - - - name: Check 'release' Label - id: check_release_label - run: | - labels='${{ toJSON(github.event.pull_request.labels) }}' - echo "Labels de la PR : $labels" - if echo "$labels" | jq -e '.[] | select(.name=="release")' > /dev/null; 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: Deploy to GitHub Pages - if: env.has_release_label == 'true' - run: | - helm package . --destination artifacts/ - helm repo index . --url https://charts.getlago.com/ - git add . - git commit -m "Update Helm repo index after release" - git pull - git status - git push origin gh-pages - - - name: Extract version from Chart.yaml - if: env.has_release_label == 'true' - id: get_version - run: | - version=$(grep '^version:' Chart.yaml | awk '{print $2}') - echo "Extracted version: $version" - echo "version=$version" >> $GITHUB_ENV - - - name: Create Git tag - if: env.has_release_label == 'true' - run: | - git tag "v${{ env.version }}" - git push origin "v${{ env.version }}" - - - name: Create GitHub Release - if: env.has_release_label == 'true' - uses: softprops/action-gh-release@v2 - with: - tag_name: "v${{ env.version }}" - name: "Release v${{ env.version }}" - generate_release_notes: true - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}