mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
ci/update: cleanup how we get nixvim-ci's user-info
Get id, name, & email in a single `user-info` step.
(cherry picked from commit 2d60548ab1
)
This commit is contained in:
parent
ebdf6ee37b
commit
37713a69e7
1 changed files with 16 additions and 5 deletions
21
.github/workflows/update.yml
vendored
21
.github/workflows/update.yml
vendored
|
@ -48,16 +48,27 @@ jobs:
|
||||||
app-id: ${{ vars.CI_APP_ID }}
|
app-id: ${{ vars.CI_APP_ID }}
|
||||||
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Get GitHub App User ID
|
- name: Get GitHub App user info
|
||||||
id: user-id
|
id: user-info
|
||||||
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
|
slug: ${{ steps.app-token.outputs.app-slug }}
|
||||||
|
run: |
|
||||||
|
name="$slug[bot]"
|
||||||
|
id=$(gh api "/users/$name" --jq .id)
|
||||||
|
{
|
||||||
|
echo "id=$id"
|
||||||
|
echo "name=$name"
|
||||||
|
echo "email=$id+$name@users.noreply.github.com"
|
||||||
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
|
env:
|
||||||
|
name: ${{ steps.user-info.outputs.name }}
|
||||||
|
email: ${{ steps.user-info.outputs.email }}
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
|
git config --global user.name "$name"
|
||||||
git config --global user.email '${{ steps.user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
|
git config --global user.email "$email"
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue