Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Use org secret for pushing tags (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
komalsukhani authored Jan 12, 2023
1 parent 398cf92 commit ef02386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create_nightly_tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: "publish nightly tag"
if: success()
env:
TYK_OPERATOR_TOKEN: ${{ secrets.TYK_OPERATOR_TOKEN }}
ORG_GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}
run: |
tag=$(git for-each-ref --sort=-v:refname --count=1 --format '%(refname)' refs/tags/[0-9]*.[0-9]*.[0-9] refs/tags/v[0-9]*.[0-9]*.[0-9] | cut -d / -f 3-)
tag_commit=$(git rev-list -n 1 "$tag")
Expand All @@ -37,7 +37,7 @@ jobs:
git_refs_url=$(jq .repository.git_refs_url "$GITHUB_EVENT_PATH" | tr -d '"' | sed 's/{\/sha}//g')
echo "$dt: **pushing tag $new to repo $full_name"
curl -s -X POST "$git_refs_url" \
-H "Authorization: token $TYK_OPERATOR_TOKEN" \
-H "Authorization: token $ORG_GH_TOKEN" \
-d @- << EOF
{
"ref": "refs/tags/$new",
Expand Down

0 comments on commit ef02386

Please sign in to comment.