Skip to content

gha test

gha test #5

Workflow file for this run

name: Release Module
on:
pull_request:
branches: [master,main]
types: [closed]
jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Check PR labels
id: check_pr_label
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
LABELS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}/labels")
NUMBER_OF_LABELS=$(echo "$LABELS" |wc -w)
if [ "$NUMBER_OF_LABELS" -eq "1" ] ; then
echo "Found: $LABELS"
echo "release-type=$LABELS" >> "$GITHUB_OUTPUT"
fi