c3ce4079d7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1d96c772d1...0ad4b8fada
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
name: "Update terraform-providers"
|
|
|
|
on:
|
|
#schedule:
|
|
# - cron: "0 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
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
|
|
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
|
|
with:
|
|
nix_path: nixpkgs=channel:nixpkgs-unstable
|
|
- name: setup
|
|
id: setup
|
|
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]"
|
|
echo | nix-shell \
|
|
maintainers/scripts/update.nix \
|
|
--argstr commit true \
|
|
--argstr keep-going true \
|
|
--argstr max-workers 2 \
|
|
--argstr path terraform-providers
|
|
- name: get failed updates
|
|
run: |
|
|
echo 'FAILED<<EOF' >> $GITHUB_ENV
|
|
git ls-files --others >> $GITHUB_ENV
|
|
echo 'EOF' >> $GITHUB_ENV
|
|
# cleanup logs of failed updates so they aren't included in the PR
|
|
- name: clean repo
|
|
run: |
|
|
git clean -f
|
|
- name: create PR
|
|
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83 # v6.0.4
|
|
with:
|
|
body: |
|
|
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
|
|
|
|
https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}
|
|
|
|
These providers failed to update:
|
|
```
|
|
${{ env.FAILED }}
|
|
```
|
|
|
|
Check that all providers build with:
|
|
```
|
|
@ofborg build opentofu.full
|
|
```
|
|
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.
|
|
branch: terraform-providers-update
|
|
delete-branch: false
|
|
title: ${{ steps.setup.outputs.title }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|