forked from ruby/setup-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split workflows into PR and bump tags on merge to main
- Loading branch information
1 parent
86f7568
commit 1366439
Showing
2 changed files
with
43 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Bump Tags on Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
bump-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Update v2, v2.0.1, and v2.0.2 tags | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email github-actions[bot]@users.noreply.github.com | ||
git tag -fa v2 -m "Update v2 tag to latest commit on main" | ||
git tag -fa v2.0.1 -m "Update v2.0.1 tag to latest commit on main" | ||
git tag -fa v2.0.2 -m "Update v2.0.2 tag to latest commit on main" | ||
git push origin v2 v2.0.1 v2.0.2 --force | ||
- name: Send Slack notification on success | ||
uses: slackapi/slack-github-action@v1 | ||
with: | ||
payload: | | ||
{ | ||
"text": "Updated setup-ruby v2, v2.0.1, and v2.0.2 tags to the latest commit on main" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.CACHE_SLACK_WEBHOOK_URL }} |