From 46ed81df7998953be91be39caa5b0dcd32f6a412 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:10:28 +1000 Subject: [PATCH 1/2] terraform-providers.updateScript: remove no-build needed for the terraform update action so it doesn't commit updates that failed to build --- .../networking/cluster/terraform-providers/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/default.nix b/pkgs/applications/networking/cluster/terraform-providers/default.nix index 835198c94e63..5ef3a336e295 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/default.nix @@ -52,7 +52,7 @@ let passthru = attrs // { updateScript = writeShellScript "update" '' provider="$(basename ${provider-source-address})" - ./pkgs/applications/networking/cluster/terraform-providers/update-provider --no-build "$provider" + ./pkgs/applications/networking/cluster/terraform-providers/update-provider "$provider" ''; }; }); From a8d8d9fee56c5c5632744f5c973301e6eebdd92e Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:10:28 +1000 Subject: [PATCH 2/2] .github/workflows/update-terraform-providers.yml: re-enable - run daily with updateScript, will create a commit for each provider update - drop wip label and failure comment --- .../workflows/update-terraform-providers.yml | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update-terraform-providers.yml b/.github/workflows/update-terraform-providers.yml index 593ddf14f3ec..f996e86376e1 100644 --- a/.github/workflows/update-terraform-providers.yml +++ b/.github/workflows/update-terraform-providers.yml @@ -1,8 +1,8 @@ name: "Update terraform-providers" on: - #schedule: - # - cron: "14 3 * * 0" + schedule: + - cron: "0 3 * * *" workflow_dispatch: permissions: @@ -28,10 +28,11 @@ jobs: 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 - ./update-all-providers --no-build - git commit -m "${{ steps.setup.outputs.title }}" providers.json - popd + nix-shell \ + maintainers/scripts/update.nix \ + --argstr commit true \ + --argstr keep-going true \ + --argstr path terraform-providers - name: create PR uses: peter-evans/create-pull-request@v4 with: @@ -44,13 +45,5 @@ jobs: ``` branch: terraform-providers-update delete-branch: false - labels: "2.status: work-in-progress" title: ${{ steps.setup.outputs.title }} token: ${{ secrets.GITHUB_TOKEN }} - - name: comment on failure - uses: peter-evans/create-or-update-comment@v2 - if: ${{ failure() }} - with: - issue-number: 153416 - body: | - Automatic update of terraform providers [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).