refactor: Add logic to PR to remove label whenever this workflow is run #42
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: Update Recommendation Object on Pull Request | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- 'azure-resources/**/*.yaml' | |
- 'azure-resources/**/*.kql' | |
- 'azure-specialized-workloads/**/*.yaml' | |
- 'azure-specialized-workloads/**/*.kql' | |
- 'azure-waf/**/*.yaml' | |
- 'azure-waf/**/*.kql' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
update-json-object: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Object Generation Script | |
run: | | |
pwsh .github/scripts/build-recommendation-object.ps1 | |
shell: pwsh | |
- name: Commit and push changes | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git add . | |
git commit -m "Update Recommendation Object during PR validation" | |
git push origin ${{ github.head_ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |