1 name: "Update terraform-providers"
14 contents: write # for peter-evans/create-pull-request to create branch
15 pull-requests: write # for peter-evans/create-pull-request to create a PR
16 if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
17 runs-on: ubuntu-latest
19 - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
20 - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
22 nix_path: nixpkgs=channel:nixpkgs-unstable
26 echo "title=terraform-providers: update $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
27 - name: update terraform-providers
29 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
32 git config user.name "github-actions[bot]"
34 maintainers/scripts/update.nix \
35 --argstr commit true \
36 --argstr keep-going true \
37 --argstr max-workers 2 \
38 --argstr path terraform-providers
39 - name: get failed updates
41 echo 'FAILED<<EOF' >> $GITHUB_ENV
42 git ls-files --others >> $GITHUB_ENV
43 echo 'EOF' >> $GITHUB_ENV
44 # cleanup logs of failed updates so they aren't included in the PR
49 uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83 # v6.0.4
52 Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
54 https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}
56 These providers failed to update:
61 Check that all providers build with:
63 @ofborg build opentofu.full
65 If there is more than ten commits in the PR `ofborg` won't build it automatically and you will need to use the above command.
66 branch: terraform-providers-update
68 title: ${{ steps.setup.outputs.title }}
69 token: ${{ secrets.GITHUB_TOKEN }}