|
18 | 18 | description: 'Workflow files/file extensions to clean (no wildcards, enter "" for none)' |
19 | 19 | required: false |
20 | 20 | default: '.yaml' |
| 21 | + clean-devc: |
| 22 | + description: 'Clean devcontainer files' |
| 23 | + required: false |
| 24 | + default: true |
| 25 | + type: boolean |
21 | 26 |
|
22 | 27 | jobs: |
23 | 28 | update_workflow: |
24 | 29 | name: "Update Workflow" |
25 | 30 | runs-on: ubuntu-latest |
26 | 31 | permissions: |
27 | 32 | contents: write |
28 | | - pull-requests: write |
29 | 33 | id-token: write |
| 34 | + packages: read |
| 35 | + pull-requests: write |
30 | 36 | steps: |
31 | 37 | - name: "Checkout Repository" |
32 | 38 | uses: actions/checkout@v6 |
@@ -115,3 +121,35 @@ jobs: |
115 | 121 | [1]: https://github.com/carpentries/create-pull-request/tree/main |
116 | 122 | labels: "type: workflows" |
117 | 123 | draft: false |
| 124 | + |
| 125 | + - name: Update devcontainer |
| 126 | + id: update-devcontainer |
| 127 | + if: ${{ steps.validate-token.outputs.wf == 'true' }} |
| 128 | + uses: carpentries/actions/update-devcontainer@v1 |
| 129 | + with: |
| 130 | + token: ${{ steps.set-pat.outputs.pat || secrets.SANDPAPER_WORKFLOW }} |
| 131 | + repo: ${{ github.repository }} |
| 132 | + clean: ${{ github.event.inputs.clean-devc || 'true' }} |
| 133 | + |
| 134 | + - name: Create Devcontainer Pull Request |
| 135 | + id: cdpr |
| 136 | + if: | |
| 137 | + steps.update-devcontainer.outputs.repo-package-ref && |
| 138 | + steps.validate-token.outputs.wf == 'true' |
| 139 | + uses: carpentries/create-pull-request@main |
| 140 | + with: |
| 141 | + token: ${{ steps.set-pat.outputs.pat || secrets.SANDPAPER_WORKFLOW }} |
| 142 | + delete-branch: true |
| 143 | + branch: "update/devcontainer" |
| 144 | + commit-message: "[actions] update devcontainer to version ${{ steps.update-devcontainer.outputs.repo-package-ref }}" |
| 145 | + title: "Update Devcontainer to Version ${{ steps.update-devcontainer.outputs.repo-package-ref }}" |
| 146 | + body: | |
| 147 | + :robot: This is an automated build |
| 148 | +
|
| 149 | + Set devcontainer spec to: ${{ steps.update-devcontainer.outputs.repo-package-ref }} |
| 150 | +
|
| 151 | + - Auto-generated by [create-pull-request][1] on ${{ steps.update-devcontainer.outputs.date }} |
| 152 | +
|
| 153 | + [1]: https://github.com/carpentries/create-pull-request/tree/main |
| 154 | + labels: "type: workflows" |
| 155 | + draft: false |
0 commit comments