@@ -3,8 +3,8 @@ run-name: ${{ github.actor }} send deploy EKS 🚀
33on :
44 pull_request :
55 types : [opened, reopened, synchronize, edited, closed]
6- # schedule:
7- # - cron: '30 2 * * *' # every day at midnight
6+ schedule :
7+ - cron : ' 30 2 * * *' # run daily
88 workflow_dispatch :
99 workflow_call :
1010env :
1515 pull_req_id : ${{github.event.pull_request.number}}
1616 DATE : $(date -d '-1 day' '+%Y-%m-%d'|sed 's/-//g')
1717 CURRENT_DATE : $(date '+%Y-%m-%d %H:%M:%S'|sed 's/-//g')
18- CI_PACKAGE_BRANCH : ${{github.event.pull_request.head.ref || 'next ' }}
19- CI_PROJECT : ${{github.event.pull_request.head.repo.name || 'processmaker' }}
18+ CI_PACKAGE_BRANCH : ${{ github.event.pull_request.head.ref || github.event.ref || 'develop ' }}
19+ CI_PROJECT : ${{github.event.pull_request.head.repo.name || github.event.repository.name || 'processmaker' }}
2020 CI_PR_BODY : ${{ github.event_name == 'schedule' && 'No ci tags needed here' || github.event.pull_request.body }}
21- IMAGE_TAG : $(echo "$CI_PROJECT-$CI_PACKAGE_BRANCH" | sed "s;/;-;g")
21+ IMAGE_TAG : $(echo "$CI_PROJECT-$CI_PACKAGE_BRANCH" | sed "s;/;-;g" | sed "s/refs-heads-//g" )
2222 DEPLOY : ${{ secrets.DEPLOY }}
2323 GH_USER : ${{ secrets.GH_USER }}
2424 GH_EMAIL : ${{ secrets.GH_EMAIL }}
2727 GITHUB_TOKEN : ${{ secrets.GIT_TOKEN }}
2828 BUILD_BASE : ${{ (contains(github.event.pull_request.body, 'ci:build-base') || github.event_name == 'schedule') && '1' || '0' }}
2929 BASE_IMAGE : ${{ secrets.REGISTRY_HOST }}/processmaker/processmaker:base
30- K8S_BRANCH : ${{ contains(github.event.pull_request.body, 'ci:next') && 'next' || 'develop' }}
30+ K8S_BRANCH : ${{ contains(github.event.pull_request.body, 'ci:next') && 'next' || 'develop' }}
3131concurrency :
3232 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3333 cancel-in-progress : true
4848 - name : Generate image EKS
4949 run : |
5050 cd pm4-k8s-distribution/images
51- branch=$CI_PACKAGE_BRANCH tag=${{env.IMAGE_TAG}} bash build.k8s-cicd.sh
51+ branch=$(echo "${{ env. CI_PACKAGE_BRANCH }}" | sed 's/refs-heads-//g') tag=${{env.IMAGE_TAG}} bash build.k8s-cicd.sh
5252 echo "VERSION=${{ env.IMAGE_TAG }}" >> $GITHUB_ENV
5353 - name : List Images
5454 run : |
0 commit comments