Skip to content

Commit

Permalink
Update latest tagging with custom code that uses a personal access to…
Browse files Browse the repository at this point in the history
…ken to trigger workflows
  • Loading branch information
chipsenkbeil committed Jul 6, 2023
1 parent bd3b068 commit 9bc5088
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run latest-tag
uses: EndBug/latest-tag@latest
- name: Tag latest and push
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
origin_url="$(git config --get remote.origin.url)"
origin_url="${origin_url/#https:\/\//https:\/\/$GITHUB_TOKEN@}" # add token to URL
git tag latest --force
git push "$origin_url" --tags --force

0 comments on commit 9bc5088

Please sign in to comment.