Skip to content

Commit

Permalink
modify github action to use github app
Browse files Browse the repository at this point in the history
  • Loading branch information
henne49 committed Jun 5, 2024
1 parent 7cb59f7 commit e747cb4
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ jobs:
security-events: write

steps:
- uses: actions/checkout@v4
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.VERSION_BUMPER_APPID }}
private-key: ${{ secrets.VERSION_BUMPER_SECRET }}

- name: Checkout using app token
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
#token: ${{ secrets.PAT_TOKEN }}
token: ${{ steps.app-token.outputs.token }}

- name: setup .net core
uses: actions/setup-dotnet@v4
Expand All @@ -41,15 +49,18 @@ jobs:
- name: Create version file
run: |
echo "Version: ${{ steps.gitversion.outputs.majorMinorPatch }}" > version.txt
- name: Commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add version.txt
git commit -m "Update version [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
#github_token: ${{ secrets.PAT_TOKEN }}
github_token: ${{ steps.app-token.outputs.token }}
repository: henne49/dbus-opendtu
force_with_lease: true

0 comments on commit e747cb4

Please sign in to comment.