Skip to content

Commit

Permalink
Merge pull request #6 from useblacksmith/fix-github
Browse files Browse the repository at this point in the history
.github: fix bumping workflows
  • Loading branch information
adityamaru authored Dec 18, 2024
2 parents 01e5c8c + b4a0a5a commit 708a029
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/bump-cache-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
git commit -m "Bump @actions/cache version to ${{ github.event.inputs.cache_version }}"
git push origin main
# NOTE: DO NOT bump v1, since we want to keep it backed by the Blacksmith cache for now.
- name: Update v2 tag
# NOTE: Only bump v1, since we want to keep it backed by the Blacksmith cache for now.
- name: Update v1 tag
if: steps.git-check.outputs.changes == 'true'
run: |
git fetch --all --tags
git tag -fa v2 -m "Update v2 tag to latest commit"
git push origin v2 --force
git tag -fa v1 -m "Update v1 tag to latest commit"
git push origin v1 --force

- name: Send Slack notification on success
Expand All @@ -52,7 +52,7 @@ jobs:
with:
payload: |
{
"text": "Bumped setup-bazel v2 to the HEAD of main that points to ${{ github.event.inputs.cache_version }}"
"text": "Bumped setup-bazel v1 to the HEAD of main that points to ${{ github.event.inputs.cache_version }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CACHE_SLACK_WEBHOOK_URL }}
28 changes: 28 additions & 0 deletions .github/workflows/bump-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Bump Tag

on:
workflow_dispatch:

jobs:
bump-cache-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# NOTE: Only bump v2, since we want to keep v1 backed by the Blacksmith cache for now.
- name: Update v2 tag
run: |
git fetch --all --tags
git tag -fa v2 -m "Update v2 tag to latest commit"
git push origin v2 --force

- name: Send Slack notification on success
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"text": "Bumped setup-bazel v2 to the HEAD of main"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CACHE_SLACK_WEBHOOK_URL }}

0 comments on commit 708a029

Please sign in to comment.