2022-01-04 01:57:23 +01:00
name : "Update terraform-providers"
on :
2022-10-04 00:10:28 +02:00
schedule :
- cron : "0 3 * * *"
2022-01-04 01:57:23 +01:00
workflow_dispatch :
2022-07-04 03:09:50 +02:00
permissions :
contents : read
2022-01-04 01:57:23 +01:00
jobs :
tf-providers :
2022-07-04 03:09:50 +02:00
permissions :
contents : write # for peter-evans/create-pull-request to create branch
2022-09-11 09:01:47 +02:00
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
2022-01-04 01:57:23 +01:00
if : github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
runs-on : ubuntu-latest
steps :
2022-03-02 00:23:02 +01:00
- uses : actions/checkout@v3
2022-04-08 01:37:40 +02:00
- uses : cachix/install-nix-action@v17
2022-09-21 04:13:25 +02:00
with :
nix_path : nixpkgs=channel:nixpkgs-unstable
2022-01-04 01:57:23 +01:00
- name : setup
id : setup
run : |
echo ::set-output name=title::"terraform-providers: update $(date -u +"%Y-%m-%d")"
- name : update terraform-providers
run : |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
2022-10-04 00:10:28 +02:00
nix-shell \
maintainers/scripts/update.nix \
--argstr commit true \
--argstr keep-going true \
--argstr path terraform-providers
2022-01-04 01:57:23 +01:00
- name : create PR
2022-03-24 00:22:49 +01:00
uses : peter-evans/create-pull-request@v4
2022-01-04 01:57:23 +01:00
with :
body : |
2022-04-28 00:13:20 +02:00
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
2022-01-04 01:57:23 +01:00
2022-04-28 00:13:20 +02:00
Check that all providers build with :
```
2022-08-02 19:45:05 +02:00
@ofborg build terraform.full
2022-04-28 00:13:20 +02:00
```
2022-01-04 01:57:23 +01:00
branch : terraform-providers-update
delete-branch : false
title : ${{ steps.setup.outputs.title }}
token : ${{ secrets.GITHUB_TOKEN }}