Skip to content

Bump actions/checkout from 4.1.7 to 4.2.0 #128

Bump actions/checkout from 4.1.7 to 4.2.0

Bump actions/checkout from 4.1.7 to 4.2.0 #128

Workflow file for this run

name: Sanitize
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
jobs:
event_data:
runs-on: ubuntu-latest
name: pull request title
steps:
- name: read event data
run: |
import json
import os
import shlex
with open('${{ github.event_path }}') as fh:
event = json.load(fh)
print(json.dumps(event, indent=4))
escaped = shlex.quote(event['pull_request']['title'])
print(escaped)
with open(os.environ['GITHUB_ENV'], 'a') as fh:
print(f'PULL_TITLE={escaped}', file=fh)
shell: python3 {0}
- name: show PULL_TITLE environment variable
run: echo $PULL_TITLE
check_label:
runs-on: ubuntu-latest
name: inspect PR labels
steps:
- name: show labels
run: |
import os
print(os.environ['LABELS'])
shell: python3 {0}
env:
LABELS: ${{ toJSON(github.event.pull_request.labels) }}
- name: show label names
run: |
import os
print(os.environ['LABELS'])
shell: python3 {0}
env:
LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}
- name: run if labels contain "meow"
if: contains(github.event.pull_request.labels.*.name, 'meow')
run: echo "Labels contain \"meow\"."