Skip to content

feat(ci): also enforce trusted registries on normal PRs #339

feat(ci): also enforce trusted registries on normal PRs

feat(ci): also enforce trusted registries on normal PRs #339

name: Label release PR
on:
pull_request:
types:
- closed
jobs:
labelling:
if: ${{ startsWith(github.event.pull_request.head.ref, 'release-please--') }}
runs-on: ubuntu-22.04
steps:
- name: remove old label
run: |
set -x
curl --silent --fail-with-body \
-X DELETE \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: token ${{ github.token }}' \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/issues/${{ github.event.number }}/labels/autorelease:%20pending"
- name: add new label
if: ${{ github.event.pull_request.merged == true }}
run: |
set -x
curl --silent --fail-with-body \
-X POST \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: token ${{ github.token }}' \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/issues/${{ github.event.number }}/labels" \
-d '{"labels":["autorelease: tagged"]}'