Skip to content

Commit

Permalink
feat: trigger on pull_request if pr merged
Browse files Browse the repository at this point in the history
  • Loading branch information
mentlak0 committed Jul 10, 2023
1 parent 51e6784 commit a5d8311
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/increment-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Increment Version

on:
pull_request_target:
types: [closed]
jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: check source code
uses: actions/checkout@v3

- name: next release version
id: nextversion
uses: jenkins-x-plugins/jx-release-version@v2.6.11
with:
previous-version: from-file:charts/tekton-pipeline/Chart.yaml

- name: Update version in Chart.yaml
id: updatechart
uses: mikefarah/yq@v4.34.1
with:
cmd: yq eval '.version = "${{ steps.nextversion.outputs.version }}"' -i charts/tekton-pipeline/Chart.yaml

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: update Chart.yaml'
19 changes: 1 addition & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,7 @@ jobs:
steps:
- name: check source code
uses: actions/checkout@v3

- name: next release version
id: nextversion
uses: jenkins-x-plugins/jx-release-version@v2.6.11
with:
previous-version: from-file:charts/tekton-pipeline/Chart.yaml

- name: Update version in Chart.yaml
id: updatechart
uses: mikefarah/yq@v4.34.1
with:
cmd: yq eval '.version = "${{ steps.nextversion.outputs.version }}"' -i charts/tekton-pipeline/Chart.yaml

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: update Chart.yaml'


- uses: J12934/helm-gh-pages-action@master
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
Expand Down

0 comments on commit a5d8311

Please sign in to comment.