mirror of https://github.com/dapr/java-sdk.git
DaprBot pushing tag or to branch already triggers build. (#1238)
Signed-off-by: Artur Souza <asouza.pro@gmail.com>
This commit is contained in:
parent
ed95feeaf4
commit
ad917d215b
|
@ -53,22 +53,4 @@ jobs:
|
|||
git remote set-url origin https://x-access-token:${{ secrets.DAPR_BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
|
||||
# Copy first to allow automation to use the latest version and not the release branch's version.
|
||||
cp -R ./.github/scripts ${RUNNER_TEMP}/
|
||||
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
|
||||
trigger:
|
||||
name: Triggers the Dapr SDK build
|
||||
runs-on: ubuntu-latest
|
||||
needs: create-release
|
||||
steps:
|
||||
- name: Identify build ref to trigger build and release.
|
||||
run: |
|
||||
if [[ "${{ inputs.rel_version }}" == *"SNAPSHOT"* ]]; then
|
||||
echo "BUILD_GIT_REF=master" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BUILD_GIT_REF=v${{ inputs.rel_version }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Triggers the build and release.
|
||||
if: env.BUILD_GIT_REF != 'master'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
|
||||
run: |
|
||||
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref '${{ env.BUILD_GIT_REF }}'
|
||||
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
|
Loading…
Reference in New Issue