Skip to content

Auto-generated PR: Update configuration files #6

Auto-generated PR: Update configuration files

Auto-generated PR: Update configuration files #6

Workflow file for this run

name: PR Event
on:
pull_request:
branches:
- main
types:
- closed
jobs:
after-pr:
runs-on: ubuntu-latest
steps:
- name: 'Log GitHub context'
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "::group::Github Context"
echo "$GITHUB_CONTEXT"
echo "::endgroup::"
- name: Get PR Labels
id: get_pr_labels
uses: actions/github-script@v7
with:
script: |
const { Octokit } = require("@octokit/rest");
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN
});
const { data: pullRequest } = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
});
console.log(pullRequest);
- name: Evaluate PR Labels
id: evaluate_pr_labels
run: |
LABELS=${{ steps.get_pr_labels.outputs.labels }}
echo "PR Labels: $LABELS"
if [[ "$LABELS" == *"sdk-libs"* ]]; then
echo "Specific label found. Proceeding with publishing."
echo "publish=true" >> $GITHUB_ENV
else
echo "Specific label not found. Exiting."
echo "publish=false" >> $GITHUB_ENV