Workflow that triggers after-release actions #231
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: Workflow that triggers after-release actions | |
| on: | |
| workflow_run: | |
| workflows: ["Release"] | |
| types: | |
| - completed | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| outputs: | |
| version: ${{ steps.get-version.outputs.VERSION }} # Define job output | |
| steps: | |
| - name: Get the released tags version | |
| id: get-version | |
| run: | | |
| REF="${{ github.event.workflow_run.head_branch }}" | |
| VERSION=${REF/refs\/tags\//} | |
| echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" # Use GITHUB_OUTPUT | |
| - name: Trigger repo publishing | |
| uses: peter-evans/repository-dispatch@v3 # Use a more current version | |
| with: | |
| token: ${{ secrets.GHA_PAT_BASIC }} | |
| repository: ethersphere/repos | |
| event-type: publish-repos | |
| client-payload: '{"package": "bee", "tag": "${{ steps.get-version.outputs.VERSION }}"}' |