mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 19:54:05 +00:00
41173fb24d
also add git clean so logs aren't committed
52 lines
1.8 KiB
YAML
52 lines
1.8 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, 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:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v17
|
|
with:
|
|
nix_path: nixpkgs=channel:nixpkgs-unstable
|
|
- 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]"
|
|
echo | nix-shell \
|
|
maintainers/scripts/update.nix \
|
|
--argstr commit true \
|
|
--argstr keep-going true \
|
|
--argstr max-workers 2 \
|
|
--argstr path terraform-providers
|
|
git clean -f
|
|
- name: create PR
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
body: |
|
|
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
|
|
|
|
Check that all providers build with:
|
|
```
|
|
@ofborg build terraform.full
|
|
```
|
|
branch: terraform-providers-update
|
|
delete-branch: false
|
|
title: ${{ steps.setup.outputs.title }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|