about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2023-03-24 09:50:30 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2023-03-25 12:41:02 +1000
commitab693050668acfff5ea4a4670d3f410a9b8a1010 (patch)
tree223acbedcd4f1e435e8f3adf320fcb1de62ac798 /.github/workflows
parent8e6f872c22bfebc8f5a8b3767c441e1ff4496af3 (diff)
.github/workflows/update-terraform-providers.yml: various
- removed outdated permissions comment

- add failed updates step

- add failed updates and ofborg rebuild to PR body
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/update-terraform-providers.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/.github/workflows/update-terraform-providers.yml b/.github/workflows/update-terraform-providers.yml
index 4cf798a654bbe..050d764ddccf4 100644
--- a/.github/workflows/update-terraform-providers.yml
+++ b/.github/workflows/update-terraform-providers.yml
@@ -12,7 +12,7 @@ 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
+      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:
@@ -36,6 +36,12 @@ jobs:
             --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
@@ -47,10 +53,16 @@ jobs:
 
             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 terraform.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 }}