-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make release news workflow trigger the deploy workflow (#340)
- Loading branch information
Showing
2 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# This is needed so that the deploy workflow will be triggered for news release commits. | ||
# See https://github.com/orgs/community/discussions/26220 | ||
persist-credentials: false | ||
|
||
- name: Generate News Posts | ||
id: generate_news | ||
shell: bash | ||
|
@@ -38,3 +33,14 @@ jobs: | |
git config user.email [email protected] | ||
git commit -m "${{ steps.generate_news.outputs.generated_commit_message }}" | ||
git push | ||
- name: Deploy Changes | ||
if: ${{ steps.generate_news.outputs.changes > 0 }} | ||
# If you use the GITHUB_TOKEN to push code, it won't trigger any on-push | ||
# workflows, so we manually the workflow here. | ||
# We can't just call the workflow directly because we need the workflow to run | ||
# on the new commit, not the GITHUB_REF for this workflow. | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh workflow run .github/workflows/deploy.yml -R "${{ github.repository }}" |