diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e6c2fb..c15ffdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,23 +77,11 @@ jobs: wfctl plugin validate-contract --for-publish --tag "${{ inputs.tag || github.ref_name }}" --release-dir . . fi - notify-registry: + publish-release: if: startsWith(github.ref, 'refs/tags/v') needs: [release] runs-on: ubuntu-latest steps: - - name: Notify workflow-registry - if: env.GH_TOKEN != '' - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.REGISTRY_PAT }} - repository: GoCodeAlone/workflow-registry - event-type: plugin-release - client-payload: >- - {"plugin": "${{ github.repository }}", "tag": "${{ github.ref_name }}"} - env: - GH_TOKEN: ${{ secrets.REGISTRY_PAT }} - continue-on-error: true - name: Publish GitHub release uses: actions/github-script@v7 with: @@ -116,3 +104,23 @@ jobs: draft: false, }); } + + notify-workflow-registry: + name: Notify workflow-registry + runs-on: ubuntu-latest + permissions: + contents: read + needs: publish-release + if: >- + !github.event.deleted + && !contains(github.ref_name, '-') + && github.repository == 'GoCodeAlone/workflow-plugin-azure' + steps: + - name: Trigger registry manifest sync + uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4 + with: + token: ${{ secrets.repo_dispatch_token }} + repository: GoCodeAlone/workflow-registry + event-type: plugin-release + client-payload: |- + {"plugin": "azure", "tag": "${{ github.ref_name }}"}