Skip to content

Commit

Permalink
[CI] Manual workflow trigger deploy new release
Browse files Browse the repository at this point in the history
test 2 - Setting a custom commit-message variable (TRAVIS_MSG) and setting it with a conditional step
  • Loading branch information
RoiArthurB committed Aug 11, 2021
1 parent 8345987 commit 3804124
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/github-travis.yml
Expand Up @@ -49,15 +49,23 @@ jobs:
env:
MSG: ${ github.event.head_commit.message }


- name: Set Travis env
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "[WARNING] Forcing travis version release"
echo "TRAVIS_MSG=ci release" >> $GITHUB_ENV
else
echo "TRAVIS_MSG=$(echo $github.event.head_commit.message )" >> $GITHUB_ENV
fi
echo $TRAVIS_MSG
- name: Publish to Github
shell: bash
run: $GITHUB_WORKSPACE/travis/publish.sh
env:
SSH_USER_PWD: ${{ secrets.USER_PWD }}
SSH_HOST: ${{ secrets.SSH_HOST }}
# If workflow_dispatch trigger change commit message to 'ci release' else use real commit message
MSG: "${{ github.event_name == 'workflow_dispatch' && 'ci release' || github.event.head_commit.message }}"
MSG: ${{ env.TRAVIS_MSG }}
GITHUB_TOKEN: ${{ github.token }}
SSHPASS: ${{ secrets.USER_PWD }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
Expand Down

0 comments on commit 3804124

Please sign in to comment.