mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
terraform-providers: add github token to update-providers
This commit is contained in:
parent
7ab926e57b
commit
9fde2b66f8
@ -11,8 +11,8 @@ permissions:
|
||||
jobs:
|
||||
tf-providers:
|
||||
permissions:
|
||||
contents: write # for peter-evans/create-pull-request to create branch
|
||||
pull-requests: write # for peter-evans/create-pull-request to create a PR, for peter-evans/create-or-update-comment to create or update comment
|
||||
contents: write # for peter-evans/create-pull-request to create branch
|
||||
pull-requests: write # for peter-evans/create-pull-request to create a PR, for peter-evans/create-or-update-comment to create or update comment
|
||||
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -25,6 +25,8 @@ jobs:
|
||||
run: |
|
||||
echo "title=terraform-providers: update $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
|
||||
- name: update terraform-providers
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config user.name "github-actions[bot]"
|
||||
|
@ -137,7 +137,7 @@ repo="$(echo "${provider_source_url}" | cut -d '/' -f 5)"
|
||||
update_attr repo "${repo}"
|
||||
|
||||
if [[ ${spdx} == 1 ]]; then
|
||||
spdx="$(curl -L -s "https://api.github.com/repos/${org}/${repo}/license" | jq -r '.license.spdx_id')"
|
||||
spdx="$(curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} "https://api.github.com/repos/${org}/${repo}/license" | jq -r '.license.spdx_id')"
|
||||
update_attr spdx "${spdx}"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user