Skip to content

Create a config PR with updated rules #1

Create a config PR with updated rules

Create a config PR with updated rules #1

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.DAX_WEB_AUTOFILL_AUTOMATION }}
- uses: actions/setup-node@v3
with:
node-version: current
- name: Build and compact rules
run: |
cd autoconsent
npm ci
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: |
package.json
package-lock.json
overrides/*
features/autoconsent.json
commit-message: Update autoconsent to ${{ env.TAG }}
branch: update-autoconsent
title: Update autoconsent to ${{ env.TAG }}
body: ''
token: ${{ secrets.DAX_WEB_AUTOFILL_AUTOMATION }}