Skip to content

Commit

Permalink
prefix in different step?
Browse files Browse the repository at this point in the history
  • Loading branch information
pospisilf committed Feb 8, 2024
1 parent d3b76ff commit e5e0719
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@ jobs:

steps:
- name: Check for branch in vscode-uitests-tooling (macos, ubuntu)
id: initjob
run: |
REPO_URL="https://api.github.com/repos/$USER/vscode-uitests-tooling/branches"
RESPONSE=$(curl -s -H "Authorization: Bearer $TOKEN" "$REPO_URL")
if ([ $? -ne 0 ]); then
echo "::set-output name=BRANCH_EXISTS::false"
echo "BRANCH_EXISTS=false" >> $GITHUB_OUTPUT
fi
BRANCH_EXISTS=$(echo "$RESPONSE" | jq -r '.[] | select(.name=="'"$BRANCH"'") | .name')
if [ "$BRANCH_EXISTS" == "$BRANCH" ]; then
echo "::set-output name=BRANCH_EXISTS::true"
echo "BRANCH_EXISTS=true" >> $GITHUB_OUTPUT
else
echo "::set-output name=BRANCH_EXISTS::false"
echo "BRANCH_EXISTS=false" >> $GITHUB_OUTPUT
fi
main:
Expand All @@ -54,14 +55,14 @@ jobs:
USER: "${{ github.repository_owner }}"
BRANCH: "${{ github.ref_name }}"
TOKEN: "${{ secrets.GITHUB_TOKEN }}"
BRANCH_EXISTS: "${{ needs.init.outputs.BRANCH_EXISTS }}"
BRANCH_EXISTS: "${{ BRANCH_EXISTS }}"

runs-on: ${{ matrix.os }}
needs: [ init ]
steps:
- name: kill pipeline
run: |
echo $BRANCH_EXISTS
echo ${{ steps.initjob.outputs.BRANCH_EXISTS }}
KILLER = "${{github.event.pull_request.user.login}}?
echo $KILLER
Expand Down

0 comments on commit e5e0719

Please sign in to comment.