Skip to content

Commit

Permalink
update to new labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ines-gimeno-molina authored May 3, 2024
1 parent 98bfde2 commit 3c8b26f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/label-new-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,17 @@ jobs:
CONDITIONS_PATH="${ROOT_PATH}/conditions.json"
echo "$CONDITIONS_PATH"
echo "::set-output name=conditions_path::$CONDITIONS_PATH"
- name: Read conditions from JSON
id: read-conditions
run: |
CONDITIONS=$(cat ${CONDITIONS_PATH})
echo "::set-output name=conditions::$CONDITIONS"
env:
CONDITIONS_PATH: ${{ steps.get-conditions-path.outputs.conditions_path }}
- name: Determine label based on condition
id: determine-label
run: |
label_out=$(jq -r --arg issueTitle "$ISSUE_TITLE" '.[] | select(.program == $issueTitle) | .label' $CONDITIONS_PATH)
echo "Label: $label_out"
echo "::set-output name=label::$label_out"
env:
CONDITIONS_PATH: ${{ steps.get-conditions-path.outputs.conditions_path }}
ISSUE_TITLE: ${{ github.event.issue.title }}
CONDITIONS: ${{ steps.read-conditions.outputs.conditions }}


- name: Print check
run: echo "There is an issue containing the word testing"

Expand All @@ -52,7 +44,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: test
LABELS: ${{ steps.determine-label.outputs.label }}

- name: Set Branch Name
id: set-branch-name
Expand Down

0 comments on commit 3c8b26f

Please sign in to comment.