release-pipeline #4
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
name: release-pipeline | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
description: "Name of the package that will be published" | |
required: true | |
type: string | |
version: | |
description: "Version of the package that will be published" | |
required: true | |
type: string | |
jobs: | |
pipeline: | |
env: | |
repositorio: prefapp-helm | |
proyecto: prefapp | |
git_user: 'github-actions' | |
git_email: '[email protected]' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Calculating branch name | |
id: step-branch | |
run: echo "::set-output name=branch::$(echo new-release/${{ inputs.package }}-${{ inputs.version }})" | |
- name: Commit Message | |
id: step-commit_message | |
run: echo "::set-output name=commit_message::$(echo New Chart Release '${{ inputs.package }}-${{ inputs.version }}')" | |
- name: Create branch with changes | |
run: | | |
git config --global user.name ${{ env.git_user }} | |
git config --global user.email ${{ env.git_email }} | |
git checkout -b ${{ steps.step-branch.outputs.branch }} | |
helm package . -d docs/ | |
cd docs/ && helm repo index . | |
git add . | |
git commit -m "${{steps.step-commit_message.outputs.commit_message}}" | |
git push origin ${{ steps.step-branch.outputs.branch }} | |
- name: Create Pull Request | |
run: | | |
prName="Bump release ${{ inputs.package }}-${{ inputs.version }}" | |
docker run -v $(pwd):/repo prefapp/prefapp-cicdpy:sleep-test github.pr_auto_merge \ | |
token=${{ secrets.GITHUB_TOKEN }} \ | |
titulo="${prName}" \ | |
rama_origen=${{ steps.step-branch.outputs.branch }} \ | |
repo=${{ env.repositorio }} \ | |
proyecto=${{ env.proyecto }} \ | |
reviewers='${{ github.actor }}' |