Update meta keys to reflect recent WDS meta key migration. #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- dev | |
types: [closed] | |
jobs: | |
update_changelog: | |
name: Update and Commit Changelog | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true && startsWith( github.event.pull_request.title, '[' ) | |
steps: | |
# Checkout git. | |
- uses: actions/checkout@v2 | |
with: | |
ref: dev # checkout dev branch. | |
fetch-depth: 0 # fetch all history. | |
- run: git config --global user.email "[email protected]" | |
- run: git config --global user.name "Iconibot" | |
- name: Create Changelog Entry String | |
run: | | |
import json | |
import os | |
with open('${{ github.event_path }}') as fh: | |
event = json.load(fh) | |
escaped = event['pull_request']['title'] | |
with open(os.environ['GITHUB_ENV'], 'a') as fh: | |
print(f'PR_TITLE={escaped}', file=fh) | |
shell: python3 {0} | |
# Update changelog. | |
- run: | | |
printf "%b" "$PR_TITLE \n" >> changelog-dev.md | |
# Commit changes. | |
- run: git add changelog-dev.md | |
- run: git commit -m "Update Changelog" || echo "No changes to commit" | |
- run: git push origin dev |