This repository has been archived by the owner on Jun 8, 2024. It is now read-only.
[FIRMWARE REQUEST]: UDR 3.1.15 #17
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
name: Update new firmware request issue | |
on: | |
issues: | |
types: | |
- opened | |
env: | |
LABEL_COLOR: "#D9B245" | |
jobs: | |
process-new-issue: | |
name: Process new issue | |
runs-on: ubuntu-22.04 | |
if: "contains(github.event.issue.labels.*.name, 'new firmware')" | |
permissions: | |
issues: write | |
env: | |
GH_TOKEN: ${{ github.token }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get fields from issue | |
id: issue-fields | |
run: | | |
echo "${{github.event.issue.body}}" | python ci/get_fields_from_new_firmware_issue.py >> $GITHUB_OUTPUT | |
- name: Tag the issue | |
run: | | |
LABEL_NAME="device: ${{ steps.issue-fields.outputs.device }}" | |
gh label create "${LABEL_NAME}" --force --color "${LABEL_COLOR}" --description "Firmware request for ${{ steps.issue-fields.outputs.device }}" | |
gh issue edit ${{ github.event.issue.number }} --add-label "device: ${{ steps.issue-fields.outputs.device }}" | |
- name: Fix the issue title | |
run: | | |
gh issue edit ${{ github.event.issue.number }} --title "[FIRMWARE REQUEST]: ${{ steps.issue-fields.outputs.device }} ${{ steps.issue-fields.outputs.firmware_version }}" | |
- name: Check firmware is definitely not supported already | |
run: | | |
if [ -d "./devices/${{ steps.issue-fields.outputs.device }}/${{ steps.issue-fields.outputs.firmware_version }}" ]; then | |
gh issue comment ${{ github.event.issue.number }} -b "It appears that this firmware may already be supported. If this is incorrect, please reopen the issue!" | |
gh issue edit ${{ github.event.issue.number }} --add-label "duplicate" | |
gh issue close ${{ github.event.issue.number }} | |
exit 1 | |
fi | |
- name: Comment with GPL Archive Request email body | |
run: | | |
COMMENT_BODY="$(python ci/render_request_email_issue_comment.py "${{ steps.issue-fields.outputs.device }}" "${{ steps.issue-fields.outputs.firmware_version }}")" | |
gh issue comment ${{ github.event.issue.number }} -b "${COMMENT_BODY}" |