Skip to content

check if new org as needed job #23

check if new org as needed job

check if new org as needed job #23

name: Przetworzenie organizacji

Check failure on line 1 in .github/workflows/nowa-organizacja.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/nowa-organizacja.yaml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: check-if-new-org
on:
issues:
types: [opened]
env:
GH_TOKEN: ${{ github.token }}
permissions:
contents: read
issues: write
jobs:
check-if-new-org:
if: contains(github.event.issue.labels.*.name, 'nowa-organizacja')
name: Check if this is new org issue
process-issue-title:
needs: [check-if-new-org]
name: Process new organization
runs-on: ubuntu-latest
steps:
- name: Ekstrakcja nazwy zgłoszenia
id: name_extraction
run: |
echo "GITHUB_ISSUE_TITLE=$(gh issue view ${{ github.event.issue.number }} --repo ${{
github.repository }} --json title --template '{{.title}}')" >> $GITHUB_OUTPUT
- name: Parse issue
id: parse
uses: onmax/issue-form-parser@v1.5
with:
issue_number: ${{ github.event.issue.number }}
- name: Show parsed payload data
run: |
# Using the character `'` to prevent all characters enclosed within
# them from being treated as special characters (e.g. $ or `)
echo '${{ steps.parse.outputs.payload }}'
echo "${{ fromJson(steps.parse.outputs.payload)['Nazwa Twojej organizacji'] }}"
- name: Aktualizacja nazwy zgłoszenia
env:
GITHUB_TOKEN: ${{ github.token }}
if: steps.name_extraction.outputs.GITHUB_ISSUE_TITLE == '[Nowa Organizacja]'
run: |
gh issue edit --repo "$GITHUB_REPOSITORY" ${{ github.event.issue.number }} --title "[Nowa Organizacja] ${{ fromJson(steps.parse.outputs.payload)['Nazwa Twojej organizacji'] }}"