Skip to content

Commit

Permalink
Add write permissions to tag workflow (#39)
Browse files Browse the repository at this point in the history
* add write permissions to tag workflow

Signed-off-by: svrnm <[email protected]>

* set author and bump version

Signed-off-by: svrnm <[email protected]>

* set branch

Signed-off-by: svrnm <[email protected]>

* add authentication

Signed-off-by: svrnm <[email protected]>

* remove write permissions

Signed-off-by: svrnm <[email protected]>

---------

Signed-off-by: svrnm <[email protected]>
  • Loading branch information
svrnm authored Dec 17, 2024
1 parent b07123a commit 73d3a57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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

0 comments on commit 73d3a57

Please sign in to comment.