Merge pull request #126 from AsociacionDrupalES/moving-folders #27
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
## Github actions to execute deploy-ENV jobs based on branch | |
name: deploy_ENV | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
env: | |
JENKINS_HOST: https://jenkins.asociaciondrupal.es | |
jobs: | |
launch_jenkins_deploy: | |
name: Launch jenkins deploy-ENV job | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Decide Jenkins job to run | |
uses: kanga333/variable-mapper@master | |
with: | |
key: ${{ github.ref }} | |
map: | | |
{ | |
"master": { | |
"JENKINS_JOB": "${{ secrets.JENKINS_JOB_PROD }}" | |
}, | |
"dev": { | |
"JENKINS_JOB": "${{ secrets.JENKINS_JOB_DEV }}" | |
} | |
} | |
- | |
name: Trigger Jenkins Job | |
uses: sbitio/trigger-jenkins-job@v1.3 | |
with: | |
JENKINS_USER: ${{ secrets.JENKINS_USER }} | |
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }} | |
JENKINS_HOST: ${{ env.JENKINS_HOST }} | |
JENKINS_JOB: ${{ env.JENKINS_JOB }} |