How to trigger a GitHub Actions workflow after the semantic-release
has created a release.
#2596
-
I'm trying to set-up Docker Build and Push workflow when a new release is created with semantic-release. This is my name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build --omit=dev
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} And this is how it try to invoke name: Build and Push Docker Image
on:
release:
types: [published]
jobs:
# ... I've tried bypassing it by targeting tag creation but no luck. Is |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@matzar I have exactly the same issue, did you find a solution? |
Beta Was this translation helpful? Give feedback.
-
The problem is GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Events triggered by GitHub Actions (using
In order to trigger another workflow, you need to use a different means of authentication, like a personal access token or a dedicated GitHub App. |
Beta Was this translation helpful? Give feedback.
The problem is
Events triggered by GitHub Actions (using
secrets.GITHUB_TOKEN
) do not trigger further eventshttps://docs.github.com/en/actions/security-guides/automatic-token-a…