Fixed vulnerability in Github Action that updates user-agent for DNS.

This commit is contained in:
23rd 2020-11-26 17:03:51 +03:00
parent 51cdb70461
commit e283b4895b

View file

@ -44,12 +44,14 @@ jobs:
git remote set-url origin $url git remote set-url origin $url
- name: Delete branch. - name: Delete branch.
env:
ref: ${{ github.event.pull_request.head.ref }}
if: | if: |
env.isPull == '1' env.isPull == '1'
&& github.event.action == 'closed' && github.event.action == 'closed'
&& startsWith(github.head_ref, env.headBranchPrefix) && startsWith(env.ref, env.headBranchPrefix)
run: | run: |
git push origin --delete ${{ github.head_ref }} git push origin --delete $ref
- name: Write a new version of Google Chrome to the user-agent for DNS. - name: Write a new version of Google Chrome to the user-agent for DNS.
if: env.isPull == '0' if: env.isPull == '0'