various fixes...

This commit is contained in:
Aleksandr Chikovani 2023-09-06 21:55:04 -04:00
parent f9a89107e6
commit ba75177ed5

View file

@ -1,31 +1,45 @@
name: Trigger tests
name: "Deploy on Comment"
on:
#pull_request:
# branches: [ development, release/** ]
issue_comment:
types: [created]
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
Integration_tests:
deploy:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && contains(github.event.comment.body, '/deploy')
steps:
- name: Build
if: github.event.issue.pull_request && github.actor == 'justrp'
env:
PR_NUMBER: ${{ github.event.number }}
PR_REF_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
PR_REF_BRANCH: ${{ github.head_ref }}
TOKEN: ${{ secrets.PIPELINE_TRIGGER_TOKEN }}
PIPELINE_TRIGGER_URL: ${{ secrets.PIPELINE_TRIGGER_URL }}
- name: Deploy
run: |
curl -X POST \
--fail \
-F "token=${TOKEN}" \
-F "ref=deleteme-chikovani" \
-F "variables[CORE_VERSION]=${PR_NUMBER}-${PR_REF_OWNER}/${PR_REF_BRANCH}" \
"${PIPELINE_TRIGGER_URL}"
echo "Deploying..."
#name: Trigger tests
#
#on:
# #pull_request:
# # branches: [ development, release/** ]
# issue_comment:
# types: [created]
#
#env:
# IMAGE_NAME: ${{ github.repository }}
#
#jobs:
# Integration_tests:
# runs-on: ubuntu-latest
#
# steps:
# - name: Build
# if: github.event.issue.pull_request && github.actor == 'justrp'
# env:
# PR_NUMBER: ${{ github.event.number }}
# PR_REF_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
# PR_REF_BRANCH: ${{ github.head_ref }}
# TOKEN: ${{ secrets.PIPELINE_TRIGGER_TOKEN }}
# PIPELINE_TRIGGER_URL: ${{ secrets.PIPELINE_TRIGGER_URL }}
# run: |
# curl -X POST \
# --fail \
# -F "token=${TOKEN}" \
# -F "ref=deleteme-chikovani" \
# -F "variables[CORE_VERSION]=${PR_NUMBER}-${PR_REF_OWNER}/${PR_REF_BRANCH}" \
# "${PIPELINE_TRIGGER_URL}"