2022-01-04 01:57:23 +01:00
|
|
|
name: "Update terraform-providers"
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "14 3 * * 1"
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tf-providers:
|
|
|
|
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-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]"
|
|
|
|
pushd pkgs/applications/networking/cluster/terraform-providers
|
2022-01-31 05:48:36 +01:00
|
|
|
./update-all-providers --no-build
|
2022-01-04 01:57:23 +01:00
|
|
|
git commit -m "${{ steps.setup.outputs.title }}" providers.json
|
|
|
|
popd
|
|
|
|
- name: create PR
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
with:
|
|
|
|
body: |
|
|
|
|
Automatic update of terraform providers.
|
|
|
|
|
|
|
|
Created by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
|
|
|
|
|
2022-01-04 09:09:37 +01:00
|
|
|
Check that all providers build with `@ofborg build terraform-full`
|
2022-01-04 01:57:23 +01:00
|
|
|
branch: terraform-providers-update
|
|
|
|
delete-branch: false
|
2022-01-04 09:09:37 +01:00
|
|
|
labels: "2.status: work-in-progress"
|
2022-01-04 01:57:23 +01:00
|
|
|
title: ${{ steps.setup.outputs.title }}
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: comment on failure
|
2022-03-23 00:27:02 +01:00
|
|
|
uses: peter-evans/create-or-update-comment@v2
|
2022-01-04 01:57:23 +01:00
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
issue-number: 153416
|
|
|
|
body: |
|
|
|
|
Automatic update of terraform providers [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
|