Update allowlist-request.yml #4
Workflow file for this run
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: allowlist-request | ||
on: | ||
issues: | ||
types: | ||
- labeled | ||
jobs: | ||
add-comment: | ||
if: github.event.label.name == 'allowlist-request' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
extract-domain: | ||
if: github.event.label.name == 'allowlist-request' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Extract Domain | ||
id: extract_domain | ||
run: echo "Domains field value: ${{ github.event.issue.fields.domains }}" | ||
- name: Append Domain to File | ||
run: echo "Appending domain: ${{ steps.extract_domain.outputs.stdout }}" >> .source/allowlist-request.txt | ||
working-directory: ${{ github.workspace }} | ||
- name: Close Issue | ||
uses: peter-evans/close-issue@v3 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
comment: The domain will be added to the allowlist on the next successful repo commit and push. | ||
- name: Start commit change | ||
run: echo "MSG=Update allowlist-request.txt $(date +'%Y%m%d')" >> $GITHUB_ENV | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@main | ||
with: | ||
author_name: github-actions | ||
author_email: [email protected] | ||
message: ${{ env.MSG }} |