Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add write permissions to tag workflow #38

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/tag-from-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ on:
push:
paths:
- ".version" # Trigger only when the .version file changes
branches:
- main

jobs:
create_tag:
runs-on: ubuntu-24.04

steps:
# Checkout the repository
- name: Checkout repository
Expand All @@ -29,8 +30,12 @@ jobs:

# Create a tag with the version
- name: Create and push tag

env:
GITHUB_TOKEN: ${{ secrets.CISCO_SERVICE_GITHUB_AUTOMATION_TOKEN }}
GH_TOKEN: ${{ secrets.CISCO_SERVICE_GITHUB_AUTOMATION_TOKEN }}
run: |
git config user.name cisco-service
git config user.email [email protected]
git remote set-url origin https://${GH_TOKEN}@github.com/${{ github.repository }}
git tag $version
git push origin $version
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.1
v0.0.2
Loading