diff --git a/.github/workflows/actions/ado_tag/action.yml b/.github/workflows/actions/ado_tag/action.yml index 45f1582..000161c 100644 --- a/.github/workflows/actions/ado_tag/action.yml +++ b/.github/workflows/actions/ado_tag/action.yml @@ -16,30 +16,39 @@ inputs: runs: using: composite steps: - - name: Get PR's body for commit identified by ${{ inputs.commit-sha }} SHA - id: get-pr-body - env: + - env: GH_TOKEN: ${{ inputs.gh-token }} - run: | - PRBODY=$(gh pr list --json body --repo ${{ inputs.repository }} --state merged --search ${{ inputs.commit-sha }} --jq '.[].body') - echo "PRs body: $PRBODY" - echo "PRBODY=${PRBODY}" >> $GITHUB_ENV - shell: bash - - name: Extract work item reference number from PR's body - id: extract-reference-number - run: | - reference_num=$(echo $PRBODY | sed -n "s/^.*AB#\([0-9]*\).*$/\1/p") - if [ -z "$reference_num" ] - then - echo "Reference number not found!" - exit 1 - else - echo "Reference number is $reference_num" - echo "REFERENCE=${reference_num}" >> $GITHUB_ENV - fi shell: bash - - name: Add env tag for workitem - id: tag-workitem run: | - echo "Going to add tag ${{ inputs.deploy_env }} to a work item identified by $REFERENCE number." - shell: bash \ No newline at end of file + git_action_branch=$(echo "$GITHUB_ACTION_PATH" | cut -d'/' -f8) + echo $GITHUB_ACTION_PATH + echo $git_action_branch + echo $(pwd) + python /home/runner/work/workflows_tests/workflows_tests/scripts/script.py + # - name: Get PR's body for commit identified by ${{ inputs.commit-sha }} SHA + # id: get-pr-body + # env: + # GH_TOKEN: ${{ inputs.gh-token }} + # run: | + # PRBODY=$(gh pr list --json body --repo ${{ inputs.repository }} --state merged --search ${{ inputs.commit-sha }} --jq '.[].body') + # echo "PRs body: $PRBODY" + # echo "PRBODY=${PRBODY}" >> $GITHUB_ENV + # shell: bash + # - name: Extract work item reference number from PR's body + # id: extract-reference-number + # run: | + # reference_num=$(echo $PRBODY | sed -n "s/^.*AB#\([0-9]*\).*$/\1/p") + # if [ -z "$reference_num" ] + # then + # echo "Reference number not found!" + # exit 1 + # else + # echo "Reference number is $reference_num" + # echo "REFERENCE=${reference_num}" >> $GITHUB_ENV + # fi + # shell: bash + # - name: Add env tag for workitem + # id: tag-workitem + # run: | + # echo "Going to add tag ${{ inputs.deploy_env }} to a work item identified by $REFERENCE number." + # shell: bash \ No newline at end of file diff --git a/scripts/script.py b/scripts/script.py new file mode 100644 index 0000000..a982c89 --- /dev/null +++ b/scripts/script.py @@ -0,0 +1,5 @@ +def main(): + print('test') + +if __name__ == '__main__': + main() \ No newline at end of file