Create a config PR with updated rules #7
This file contains hidden or 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: Create a config PR with updated rules | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: 'The tag of the release to use' | |
required: true | |
workflow_call: | |
inputs: | |
tag_name: | |
type: string | |
description: 'The tag of the release to use' | |
required: true | |
env: | |
TAG: ${{ inputs.tag_name }} | |
jobs: | |
privacy-config-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: autoconsent/ | |
- uses: ./autoconsent/.github/actions/setup-release-scripts | |
- name: Checkout config | |
uses: actions/checkout@v3 | |
with: | |
repository: duckduckgo/privacy-configuration | |
path: privacy-configuration/ | |
token: ${{ secrets.PRIVACY_CONFIG_PAT }} | |
- name: Build and compact rules | |
run: | | |
cd autoconsent | |
npm run build-rules | |
npm run bundle-config-rules ../privacy-configuration | |
- name: Prepare and update privacy-config | |
run: | | |
cd privacy-configuration | |
npm ci | |
npm run lint-fix | |
- name: Create config PR | |
uses: peter-evans/create-pull-request@v7 | |
id: create-pr | |
with: | |
path: privacy-configuration/ | |
add-paths: | | |
overrides/* | |
features/autoconsent.json | |
commit-message: Update autoconsent to ${{ env.TAG }} | |
branch: update-autoconsent | |
title: Update autoconsent to ${{ env.TAG }} | |
body: '' | |
token: ${{ secrets.PRIVACY_CONFIG_PAT }} |