Skip to content

Commit 73d3a57

Browse files
authored
Add write permissions to tag workflow (#39)
* add write permissions to tag workflow Signed-off-by: svrnm <neumanns@cisco.com> * set author and bump version Signed-off-by: svrnm <neumanns@cisco.com> * set branch Signed-off-by: svrnm <neumanns@cisco.com> * add authentication Signed-off-by: svrnm <neumanns@cisco.com> * remove write permissions Signed-off-by: svrnm <neumanns@cisco.com> --------- Signed-off-by: svrnm <neumanns@cisco.com>
1 parent b07123a commit 73d3a57

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/tag-from-version.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ on:
66
push:
77
paths:
88
- ".version" # Trigger only when the .version file changes
9+
branches:
10+
- main
911

1012
jobs:
1113
create_tag:
1214
runs-on: ubuntu-24.04
13-
1415
steps:
1516
# Checkout the repository
1617
- name: Checkout repository
@@ -29,8 +30,12 @@ jobs:
2930
3031
# Create a tag with the version
3132
- name: Create and push tag
33+
3234
env:
33-
GITHUB_TOKEN: ${{ secrets.CISCO_SERVICE_GITHUB_AUTOMATION_TOKEN }}
35+
GH_TOKEN: ${{ secrets.CISCO_SERVICE_GITHUB_AUTOMATION_TOKEN }}
3436
run: |
37+
git config user.name cisco-service
38+
git config user.email 111539563+cisco-service@users.noreply.github.com
39+
git remote set-url origin https://${GH_TOKEN}@github.com/${{ github.repository }}
3540
git tag $version
3641
git push origin $version

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.1
1+
v0.0.2

0 commit comments

Comments
 (0)