mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
release: always use service user for git ops (#24546)
This commit is contained in:
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@@ -53,6 +53,8 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Retrieve Vault-hosted Secrets
|
||||
if: endsWith(github.repository, '-enterprise')
|
||||
id: vault
|
||||
@@ -65,8 +67,7 @@ jobs:
|
||||
secrets: |-
|
||||
kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ;
|
||||
- name: Git config token
|
||||
if: endsWith(github.repository, '-enterprise')
|
||||
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'
|
||||
run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN || secrets.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com'
|
||||
- name: Git config user/name
|
||||
run: |-
|
||||
git config --global user.email "github-team-nomad-core@hashicorp.com"
|
||||
@@ -215,5 +216,5 @@ jobs:
|
||||
fi
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
Reference in New Issue
Block a user