Trigger release pipeline on tag
This commit is contained in:
parent
d02fffc3e1
commit
4dce557294
|
@ -1,4 +1,4 @@
|
||||||
name: Tag release
|
name: Release
|
||||||
concurrency:
|
concurrency:
|
||||||
group: tag-release
|
group: tag-release
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
@ -19,6 +19,8 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
tag-release:
|
tag-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.tag-release.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Fail if branch is not master
|
- name: Fail if branch is not master
|
||||||
|
@ -33,6 +35,7 @@ jobs:
|
||||||
|
|
||||||
- run: cd scripts && yarn
|
- run: cd scripts && yarn
|
||||||
- name: Tag release
|
- name: Tag release
|
||||||
|
id: tag-release
|
||||||
run: |
|
run: |
|
||||||
cd scripts
|
cd scripts
|
||||||
# setup the username and email.
|
# setup the username and email.
|
||||||
|
@ -41,3 +44,23 @@ jobs:
|
||||||
BUMP_TYPE_INPUT=${{ github.event.inputs.versioning }}
|
BUMP_TYPE_INPUT=${{ github.event.inputs.versioning }}
|
||||||
BUMP_TYPE=${BUMP_TYPE_INPUT:-"patch"}
|
BUMP_TYPE=${BUMP_TYPE_INPUT:-"patch"}
|
||||||
./versionCommit.sh $BUMP_TYPE
|
./versionCommit.sh $BUMP_TYPE
|
||||||
|
|
||||||
|
|
||||||
|
new_version=$(./scripts/getCurrentVersion.sh)
|
||||||
|
echo "version=$new_version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
trigger-release:
|
||||||
|
needs: [tag-release]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: peter-evans/repository-dispatch@v2
|
||||||
|
with:
|
||||||
|
repository: budibase/budibase-deploys
|
||||||
|
event: release-prod
|
||||||
|
github_pat: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
|
client-payload: |-
|
||||||
|
{
|
||||||
|
"TAG": "${{ needs.tag-release.outputs.version }}"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue